Skip to content

Commit 19cc649

Browse files
committed
add test to verify that rust-lang#132391 can be closed
1 parent 652b52b commit 19cc649

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: tests/ui/attributes/malformed-fn-align.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(fn_align)]
2+
#![crate_type = "lib"]
3+
4+
trait MyTrait {
5+
#[repr(align)] //~ ERROR invalid `repr(align)` attribute: `align` needs an argument
6+
fn myfun();
7+
}

Diff for: tests/ui/attributes/malformed-fn-align.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0589]: invalid `repr(align)` attribute: `align` needs an argument
2+
--> $DIR/malformed-fn-align.rs:5:12
3+
|
4+
LL | #[repr(align)]
5+
| ^^^^^ help: supply an argument here: `align(...)`
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0589`.

0 commit comments

Comments
 (0)