diff --git a/tests/crashes/132391.rs b/tests/crashes/132391.rs deleted file mode 100644 index 6c8c2c3a87862..0000000000000 --- a/tests/crashes/132391.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ known-bug: #123291 - -trait MyTrait { - #[repr(align)] - fn myfun(); -} - -pub fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-fn_align.rs b/tests/ui/feature-gates/feature-gate-fn_align.rs index ea873dba269c4..06784a45d76c8 100644 --- a/tests/ui/feature-gates/feature-gate-fn_align.rs +++ b/tests/ui/feature-gates/feature-gate-fn_align.rs @@ -2,3 +2,8 @@ #[repr(align(16))] //~ ERROR `repr(align)` attributes on functions are unstable fn requires_alignment() {} + +trait MyTrait { + #[repr(align)] //~ ERROR `repr(align)` attributes on functions are unstable + fn myfun(); +} diff --git a/tests/ui/feature-gates/feature-gate-fn_align.stderr b/tests/ui/feature-gates/feature-gate-fn_align.stderr index eec332792b76e..cd9900c605117 100644 --- a/tests/ui/feature-gates/feature-gate-fn_align.stderr +++ b/tests/ui/feature-gates/feature-gate-fn_align.stderr @@ -8,6 +8,16 @@ LL | #[repr(align(16))] = help: add `#![feature(fn_align)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error: aborting due to 1 previous error +error[E0658]: `repr(align)` attributes on functions are unstable + --> $DIR/feature-gate-fn_align.rs:7:12 + | +LL | #[repr(align)] + | ^^^^^ + | + = note: see issue #82232 for more information + = help: add `#![feature(fn_align)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0658`.