Skip to content

Commit

Permalink
Add UI test for issue 74082
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jul 6, 2020
1 parent 5702e02 commit 97867bb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/issues/issue-74082.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 19 additions & 0 deletions src/test/ui/issues/issue-74082.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 97867bb

Please sign in to comment.