about summary refs log tree commit diff
path: root/tests/ui/parser/attribute-on-empty.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/attribute-on-empty.stderr')
-rw-r--r--tests/ui/parser/attribute-on-empty.stderr52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/ui/parser/attribute-on-empty.stderr b/tests/ui/parser/attribute-on-empty.stderr
new file mode 100644
index 00000000000..7c4806c8704
--- /dev/null
+++ b/tests/ui/parser/attribute-on-empty.stderr
@@ -0,0 +1,52 @@
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:7:16
+   |
+LL |     let _: Baz<#[cfg(any())]> = todo!();
+   |          -     ^^^^^^^^^^^^^ attributes are not allowed here
+   |          |
+   |          while parsing the type for `_`
+
+error: attributes cannot be applied to a function parameter's type
+  --> $DIR/attribute-on-empty.rs:11:14
+   |
+LL | fn f(_param: #[attr]) {}
+   |              ^^^^^^^ attributes are not allowed here
+
+error: expected type, found `)`
+  --> $DIR/attribute-on-empty.rs:11:21
+   |
+LL | fn f(_param: #[attr]) {}
+   |                     ^ expected type
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:15:11
+   |
+LL | fn g() -> #[attr] { 0 }
+   |           ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:19:12
+   |
+LL |     field: #[attr],
+   |            ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:21:14
+   |
+LL |     field1: (#[attr], i32),
+   |              ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:25:15
+   |
+LL | type Tuple = (#[attr], String);
+   |               ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:28:6
+   |
+LL | impl #[attr] {}
+   |      ^^^^^^^ attributes are not allowed here
+
+error: aborting due to 8 previous errors
+