File tree 7 files changed +846
-632
lines changed
7 files changed +846
-632
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn main() {
23
23
loop { break ; }
24
24
' l: loop { break ' l 1 ; }
25
25
match x { _ => ( ) }
26
- // let x = move |a,b,c| { a + b + c };
26
+ let x = move |a, b, c| { a + b + c } ;
27
27
let x = { 1 } ;
28
28
let x = unsafe { 1 } ;
29
29
a = 1 ;
@@ -44,3 +44,9 @@ fn main() {
44
44
return 0 ;
45
45
return ;
46
46
}
47
+
48
+ fn precedences ( ) {
49
+ x==& y||z|w. 0 <=x* * y* & & z^=l^m<<=n;
50
+ y|z..wm;
51
+ 1 >!x%y-z* -w||u?==v;
52
+ }
Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ mod foo { }
16
16
mod bar {
17
17
18
18
extern { }
19
- extern "C" { }
19
+ extern "C" {
20
+ fn foo ( x : int ) -> int ;
21
+ static x: int ;
22
+ static mut x: * mut int ;
23
+ }
20
24
21
25
type Foo = Bar < u8 > ;
22
26
@@ -26,14 +30,33 @@ mod bar {
26
30
union Foo < A , B > { x : A , y : B }
27
31
28
32
trait Foo { }
29
- trait Foo < T > { }
33
+ trait Foo < T > {
34
+ const ID1 : i32 ;
35
+ const ID2 : i32 = 1 ;
36
+
37
+ fn area1 ( & self ) -> f64 ;
38
+ fn area2 ( & self ) -> f64 { 1f64 }
39
+
40
+ type N ;
41
+ type N : fmt:: Display ;
42
+ type N : fmt:: Display = i32 ;
43
+
44
+ // foo!{}
45
+ }
30
46
31
47
impl Trait for .. { }
32
48
impl Trait < T > for .. { }
33
- impl < A > Foo < A > { }
49
+ impl < A > Foo < A > {
50
+ const ID : i32 = 1 ;
51
+ fn area ( & self ) -> f64 { 1f64 }
52
+ type N = i32 ;
53
+ // foo!()
54
+
55
+ }
34
56
impl < A > Trait for Foo < A > { }
57
+ impl < A > !Trait for Foo < A > { }
35
58
36
- macro_rules! foo { }
37
- foo ! ( ) ;
59
+ // macro_rules! foo { }
60
+ // foo!();
38
61
39
62
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() {
20
20
"hello world" ;
21
21
r"hello world" ;
22
22
r#"hello " world"# ;
23
- // b"hello world";
23
+ b"hello world" ;
24
24
br"hello world" ;
25
25
br#"hello " world"# ;
26
26
Original file line number Diff line number Diff line change @@ -25,4 +25,11 @@ fn main() {
25
25
26
26
fn foo ( ) -> impl Bound1 + Bound2 + Bound3 { }
27
27
28
-
28
+ pub fn walk < F : ' a + ' static > ( x : i32 , it : & mut F ) -> bool
29
+ where
30
+ F : FnMut ( & Pat ) -> bool ,
31
+ ' a : ' b + ' c ,
32
+ F = i32 ,
33
+ {
34
+ foo :: < ' a , A , B , C =i32 >
35
+ }
You can’t perform that action at this time.
0 commit comments