File tree Expand file tree Collapse file tree 4 files changed +49
-5
lines changed Expand file tree Collapse file tree 4 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5
- refs/heads/try: b4f57d46e66c98e571e869926cb9a7466d412e54
5
+ refs/heads/try: 1cde7e6bc266af836e0695be7282257838eee05a
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change 17
17
</list >
18
18
<list name =" keywords" >
19
19
<item > as </item >
20
+ <item > assert </item >
20
21
<item > break </item >
21
22
<item > const </item >
22
23
<item > copy </item >
68
69
<item > Shl </item >
69
70
<item > Shr </item >
70
71
<item > Index </item >
71
- <item > Not </item >
72
72
</list >
73
73
<list name =" types" >
74
74
<item > bool </item >
Original file line number Diff line number Diff line change @@ -19,3 +19,31 @@ impl Clone for () {
19
19
#[ inline( always) ]
20
20
fn clone ( & self ) -> ( ) { ( ) }
21
21
}
22
+
23
+ macro_rules! clone_impl(
24
+ ( $t: ty) => {
25
+ impl Clone for $t {
26
+ #[ inline( always) ]
27
+ fn clone( & self ) -> $t { * self }
28
+ }
29
+ }
30
+ )
31
+
32
+ clone_impl ! ( int)
33
+ clone_impl ! ( i8 )
34
+ clone_impl ! ( i16 )
35
+ clone_impl ! ( i32 )
36
+ clone_impl ! ( i64 )
37
+
38
+ clone_impl ! ( uint)
39
+ clone_impl ! ( u8 )
40
+ clone_impl ! ( u16 )
41
+ clone_impl ! ( u32 )
42
+ clone_impl ! ( u64 )
43
+
44
+ clone_impl ! ( float)
45
+ clone_impl ! ( f32 )
46
+ clone_impl ! ( f64 )
47
+
48
+ clone_impl ! ( bool )
49
+ clone_impl ! ( char )
Original file line number Diff line number Diff line change 1
1
#[ deriving_clone]
2
2
struct S {
3
- foo : ( ) ,
4
- bar : ( )
3
+ _int : int ,
4
+ _i8 : i8 ,
5
+ _i16 : i16 ,
6
+ _i32 : i32 ,
7
+ _i64 : i64 ,
8
+
9
+ _uint : uint ,
10
+ _u8 : u8 ,
11
+ _u16 : u16 ,
12
+ _u32 : u32 ,
13
+ _u64 : u64 ,
14
+
15
+ _float : float ,
16
+ _f32 : f32 ,
17
+ _f64 : f64 ,
18
+
19
+ _bool : bool ,
20
+ _char : char ,
21
+ _nil : ( )
5
22
}
6
23
7
24
fn main ( ) { }
8
-
You can’t perform that action at this time.
0 commit comments