mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-30 16:43:41 +00:00
Add UI test for issue 74082
This commit is contained in:
parent
5702e0289f
commit
97867bbe5c
9
src/test/ui/issues/issue-74082.rs
Normal file
9
src/test/ui/issues/issue-74082.rs
Normal file
@ -0,0 +1,9 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
#[repr(i128)] //~ ERROR: attribute should be applied to enum
|
||||
struct Foo;
|
||||
|
||||
#[repr(u128)] //~ ERROR: attribute should be applied to enum
|
||||
struct Bar;
|
||||
|
||||
fn main() {}
|
19
src/test/ui/issues/issue-74082.stderr
Normal file
19
src/test/ui/issues/issue-74082.stderr
Normal file
@ -0,0 +1,19 @@
|
||||
error[E0517]: attribute should be applied to enum
|
||||
--> $DIR/issue-74082.rs:3:8
|
||||
|
|
||||
LL | #[repr(i128)]
|
||||
| ^^^^
|
||||
LL | struct Foo;
|
||||
| ----------- not an enum
|
||||
|
||||
error[E0517]: attribute should be applied to enum
|
||||
--> $DIR/issue-74082.rs:6:8
|
||||
|
|
||||
LL | #[repr(u128)]
|
||||
| ^^^^
|
||||
LL | struct Bar;
|
||||
| ----------- not an enum
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0517`.
|
Loading…
Reference in New Issue
Block a user