File tree 3 files changed +30
-0
lines changed
3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,8 @@ impl CheckAttrVisitor<'tcx> {
292
292
| sym:: u32
293
293
| sym:: i64
294
294
| sym:: u64
295
+ | sym:: i128
296
+ | sym:: u128
295
297
| sym:: isize
296
298
| sym:: usize => {
297
299
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