File tree Expand file tree Collapse file tree 1 file changed +4
-23
lines changed Expand file tree Collapse file tree 1 file changed +4
-23
lines changed 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
22// file at the top-level directory of this distribution and at
33// http://rust-lang.org/COPYRIGHT.
44//
88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- use std :: num :: FromPrimitive ;
12- use std :: isize ;
11+ # [ derive ( FromPrimitive ) ] //~ERROR `#[derive]` for custom traits is not stable
12+ enum Foo { }
1313
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 ( ) { }
1815
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