File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
tests/ui/compile-fail/zeroable Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ extern crate pin_init;
2+ use pin_init:: * ;
3+
4+ #[ derive( Zeroable ) ]
5+ enum Num {
6+ A ( u32 ) ,
7+ B ( i32 ) ,
8+ }
9+
10+ #[ derive( MaybeZeroable ) ]
11+ enum Num2 {
12+ A ( u32 ) ,
13+ B ( i32 ) ,
14+ }
15+
16+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: no rules expected keyword `enum`
2+ --> tests/ui/compile-fail/zeroable/enum.rs:5:1
3+ |
4+ 5 | enum Num {
5+ | ^^^^ no rules expected this token in macro call
6+ |
7+ note: while trying to match keyword `struct`
8+ --> src/macros.rs
9+ |
10+ | $vis:vis struct $name:ident
11+ | ^^^^^^
12+
13+ error: no rules expected keyword `enum`
14+ --> tests/ui/compile-fail/zeroable/enum.rs:11:1
15+ |
16+ 11 | enum Num2 {
17+ | ^^^^ no rules expected this token in macro call
18+ |
19+ note: while trying to match keyword `struct`
20+ --> src/macros.rs
21+ |
22+ | $vis:vis struct $name:ident
23+ | ^^^^^^
You can’t perform that action at this time.
0 commit comments