diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2024-12-05 17:59:05 +0100 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2024-12-05 17:59:05 +0100 |
| commit | a4bb0d41bffcbea98d62fb94404704d6d13ea55a (patch) | |
| tree | 06628175d6e0da0df8d4b705c7688dac8e616adb | |
| parent | dfd76c1cbb9bf053b5362f283277d8064d2604a7 (diff) | |
| download | rust-a4bb0d41bffcbea98d62fb94404704d6d13ea55a.tar.gz rust-a4bb0d41bffcbea98d62fb94404704d6d13ea55a.zip | |
fix issue 132391
| -rw-r--r-- | tests/crashes/132391.rs | 8 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-fn_align.rs | 5 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-fn_align.stderr | 12 |
3 files changed, 16 insertions, 9 deletions
diff --git a/tests/crashes/132391.rs b/tests/crashes/132391.rs deleted file mode 100644 index 6c8c2c3a878..00000000000 --- 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 ea873dba269..06784a45d76 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 eec332792b7..cd9900c6051 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 <https://github.com/rust-lang/rust/issues/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`. |
