about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-repr-simd.stderr
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-07 21:36:37 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2025-01-07 21:36:37 +0100
commitb9d6e9e73ffb2eaba9242d14ef40ee2ec61584a0 (patch)
tree4fede47ee574df48437466f63b3724c0ce6d697e /tests/ui/feature-gates/feature-gate-repr-simd.stderr
parentad211ced81509462cdfe4c29ed10f97279a0acae (diff)
downloadrust-b9d6e9e73ffb2eaba9242d14ef40ee2ec61584a0.tar.gz
rust-b9d6e9e73ffb2eaba9242d14ef40ee2ec61584a0.zip
warn about broken simd not only on structs but also enums and unions when we didn't opt in to it
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-repr-simd.stderr')
-rw-r--r--tests/ui/feature-gates/feature-gate-repr-simd.stderr44
1 files changed, 41 insertions, 3 deletions
diff --git a/tests/ui/feature-gates/feature-gate-repr-simd.stderr b/tests/ui/feature-gates/feature-gate-repr-simd.stderr
index 5a0ceb2dd74..3bf8ec61705 100644
--- a/tests/ui/feature-gates/feature-gate-repr-simd.stderr
+++ b/tests/ui/feature-gates/feature-gate-repr-simd.stderr
@@ -18,6 +18,26 @@ LL | #[repr(simd)]
    = help: add `#![feature(repr_simd)]` 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[E0658]: SIMD types are experimental and possibly buggy
+  --> $DIR/feature-gate-repr-simd.rs:9:1
+   |
+LL | #[repr(simd)]
+   | ^^^^^^^^^^^^^
+   |
+   = note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
+   = help: add `#![feature(repr_simd)]` 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[E0658]: SIMD types are experimental and possibly buggy
+  --> $DIR/feature-gate-repr-simd.rs:13:1
+   |
+LL | #[repr(simd)]
+   | ^^^^^^^^^^^^^
+   |
+   = note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
+   = help: add `#![feature(repr_simd)]` 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[E0566]: conflicting representation hints
   --> $DIR/feature-gate-repr-simd.rs:4:8
    |
@@ -31,10 +51,28 @@ LL | #[repr(simd)]
    = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
    = note: `#[deny(conflicting_repr_hints)]` on by default
 
-error: aborting due to 3 previous errors
+error[E0517]: attribute should be applied to a struct
+  --> $DIR/feature-gate-repr-simd.rs:9:8
+   |
+LL | #[repr(simd)]
+   |        ^^^^
+LL |
+LL | union U {f: u32}
+   | ---------------- not a struct
+
+error[E0517]: attribute should be applied to a struct
+  --> $DIR/feature-gate-repr-simd.rs:13:8
+   |
+LL | #[repr(simd)]
+   |        ^^^^
+LL |
+LL | enum E { X }
+   | ------------ not a struct
+
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0566, E0658.
-For more information about an error, try `rustc --explain E0566`.
+Some errors have detailed explanations: E0517, E0566, E0658.
+For more information about an error, try `rustc --explain E0517`.
 Future incompatibility report: Future breakage diagnostic:
 error[E0566]: conflicting representation hints
   --> $DIR/feature-gate-repr-simd.rs:4:8