File tree 2 files changed +28
-0
lines changed
safe-discriminant/tests/fail
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ use safe_discriminant:: Discriminant ;
2
+
3
+ #[ derive( Discriminant ) ]
4
+ #[ repr( u8 ) ]
5
+ #[ repr( u16 ) ]
6
+ enum Foo {
7
+ A = 1 ,
8
+ B = 2 ,
9
+ }
10
+
11
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: conflicting representation hints
2
+ --> tests/fail/double_repr.rs:5:8
3
+ |
4
+ 5 | #[repr(u16)]
5
+ | ^^^
6
+
7
+ error[E0566]: conflicting representation hints
8
+ --> tests/fail/double_repr.rs:4:8
9
+ |
10
+ 4 | #[repr(u8)]
11
+ | ^^
12
+ 5 | #[repr(u16)]
13
+ | ^^^
14
+ |
15
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
16
+ = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
17
+ = note: `#[deny(conflicting_repr_hints)]` on by default
You can’t perform that action at this time.
0 commit comments