File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,8 @@ impl CheckAttrVisitor<'tcx> {
292292 | sym:: u32
293293 | sym:: i64
294294 | sym:: u64
295+ | sym:: i128
296+ | sym:: u128
295297 | sym:: isize
296298 | sym:: usize => {
297299 int_reprs += 1 ;
Original file line number Diff line number Diff line change 1+ #![ allow( dead_code) ]
2+
3+ #[ repr( i128 ) ] //~ ERROR: attribute should be applied to enum
4+ struct Foo ;
5+
6+ #[ repr( u128 ) ] //~ ERROR: attribute should be applied to enum
7+ struct Bar ;
8+
9+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0517]: attribute should be applied to enum
2+ --> $DIR/issue-74082.rs:3:8
3+ |
4+ LL | #[repr(i128)]
5+ | ^^^^
6+ LL | struct Foo;
7+ | ----------- not an enum
8+
9+ error[E0517]: attribute should be applied to enum
10+ --> $DIR/issue-74082.rs:6:8
11+ |
12+ LL | #[repr(u128)]
13+ | ^^^^
14+ LL | struct Bar;
15+ | ----------- not an enum
16+
17+ error: aborting due to 2 previous errors
18+
19+ For more information about this error, try `rustc --explain E0517`.
You can’t perform that action at this time.
0 commit comments