Skip to content

Commit 97867bb

Browse files
committed
Add UI test for issue 74082
1 parent 5702e02 commit 97867bb

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/test/ui/issues/issue-74082.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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() {}

src/test/ui/issues/issue-74082.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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`.

0 commit comments

Comments
 (0)