File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ const ZERO : u8 = 0 ;
2+
3+ #[ enumflags2:: bitflags]
4+ #[ derive( Copy , Clone ) ]
5+ #[ repr( u8 ) ]
6+ enum Foo {
7+ Zero = ZERO ,
8+ }
9+
10+ #[ enumflags2:: bitflags]
11+ #[ derive( Copy , Clone ) ]
12+ #[ repr( u8 ) ]
13+ enum Bar {
14+ Overflown = ( ZERO + 2 ) << 7 ,
15+ }
16+
17+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0277]: the trait bound `AssertionFailed: ExactlyOneBitSet` is not satisfied
2+ --> $DIR/zero_discriminant_deferred.rs:7:5
3+ |
4+ 7 | Zero = ZERO,
5+ | ^^^^^^^^^^^ the trait `ExactlyOneBitSet` is not implemented for `AssertionFailed`
6+
7+ error[E0277]: the trait bound `AssertionFailed: ExactlyOneBitSet` is not satisfied
8+ --> $DIR/zero_discriminant_deferred.rs:14:5
9+ |
10+ 14 | Overflown = (ZERO + 2) << 7,
11+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ExactlyOneBitSet` is not implemented for `AssertionFailed`
You can’t perform that action at this time.
0 commit comments