Skip to content

Commit a4bb0d4

Browse files
committed
fix issue 132391
1 parent dfd76c1 commit a4bb0d4

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

Diff for: tests/crashes/132391.rs

-8
This file was deleted.

Diff for: tests/ui/feature-gates/feature-gate-fn_align.rs

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
#[repr(align(16))] //~ ERROR `repr(align)` attributes on functions are unstable
44
fn requires_alignment() {}
5+
6+
trait MyTrait {
7+
#[repr(align)] //~ ERROR `repr(align)` attributes on functions are unstable
8+
fn myfun();
9+
}

Diff for: tests/ui/feature-gates/feature-gate-fn_align.stderr

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ LL | #[repr(align(16))]
88
= help: add `#![feature(fn_align)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

11-
error: aborting due to 1 previous error
11+
error[E0658]: `repr(align)` attributes on functions are unstable
12+
--> $DIR/feature-gate-fn_align.rs:7:12
13+
|
14+
LL | #[repr(align)]
15+
| ^^^^^
16+
|
17+
= note: see issue #82232 <https://github.com/rust-lang/rust/issues/82232> for more information
18+
= help: add `#![feature(fn_align)]` to the crate attributes to enable
19+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20+
21+
error: aborting due to 2 previous errors
1222

1323
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)