about summary refs log tree commit diff
path: root/tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr
diff options
context:
space:
mode:
authorcarbotaniuman <41451839+carbotaniuman@users.noreply.github.com>2024-05-15 18:52:08 -0500
committercarbotaniuman <41451839+carbotaniuman@users.noreply.github.com>2024-06-06 20:26:28 -0500
commit230b58febf78bb1680b4960d32350a7430a8aab5 (patch)
tree166d5480509f2d73ef11e8be99ec0b7f1aeee73e /tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr
parent48851d9adbd358a678e8ef8102d131aaa42884fc (diff)
downloadrust-230b58febf78bb1680b4960d32350a7430a8aab5.tar.gz
rust-230b58febf78bb1680b4960d32350a7430a8aab5.zip
Error on unsafe on non-unsafe attribute
Diffstat (limited to 'tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr')
-rw-r--r--tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr b/tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr
new file mode 100644
index 00000000000..0602af34e4f
--- /dev/null
+++ b/tests/ui/attributes/unsafe/unsafe-safe-attribute.stderr
@@ -0,0 +1,10 @@
+error: `repr` is not an unsafe attribute
+  --> $DIR/unsafe-safe-attribute.rs:3:3
+   |
+LL | #[unsafe(repr(C))]
+   |   ^^^^^^
+   |
+   = note: extraneous unsafe is not allowed in attributes
+
+error: aborting due to 1 previous error
+