File tree 3 files changed +4
-168
lines changed
3 files changed +4
-168
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ pub mod decodable;
63
63
pub mod hash;
64
64
pub mod debug;
65
65
pub mod default;
66
- pub mod primitive;
67
66
68
67
#[ path="cmp/partial_eq.rs" ]
69
68
pub mod partial_eq;
@@ -178,8 +177,6 @@ derive_traits! {
178
177
179
178
"Default" => default :: expand_deriving_default,
180
179
181
- "FromPrimitive" => primitive:: expand_deriving_from_primitive,
182
-
183
180
"Send" => bounds:: expand_deriving_unsafe_bound,
184
181
"Sync" => bounds:: expand_deriving_unsafe_bound,
185
182
"Copy" => bounds:: expand_deriving_copy,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use std :: num :: FromPrimitive ;
12
- use std :: isize ;
11
+ # [ derive ( FromPrimitive ) ] //~ERROR `#[derive]` for custom traits is not stable
12
+ enum Foo { }
13
13
14
- #[ derive( FromPrimitive ) ]
15
- struct A { x : isize }
16
- //~^^ ERROR `FromPrimitive` cannot be derived for structs
17
- //~^^^ ERROR `FromPrimitive` cannot be derived for structs
14
+ fn main ( ) { }
18
15
19
- #[ derive( FromPrimitive ) ]
20
- struct B ( isize ) ;
21
- //~^^ ERROR `FromPrimitive` cannot be derived for structs
22
- //~^^^ ERROR `FromPrimitive` cannot be derived for structs
23
-
24
- #[ derive( FromPrimitive ) ]
25
- enum C { Foo ( isize ) , Bar ( usize ) }
26
- //~^^ ERROR `FromPrimitive` cannot be derived for enums with non-unit variants
27
- //~^^^ ERROR `FromPrimitive` cannot be derived for enums with non-unit variants
28
-
29
- #[ derive( FromPrimitive ) ]
30
- enum D { Baz { x : isize } }
31
- //~^^ ERROR `FromPrimitive` cannot be derived for enums with non-unit variants
32
- //~^^^ ERROR `FromPrimitive` cannot be derived for enums with non-unit variants
33
-
34
- pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments