summaryrefslogtreecommitdiffstats
path: root/tests/ui/custom_attribute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/custom_attribute.rs')
-rw-r--r--tests/ui/custom_attribute.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/custom_attribute.rs b/tests/ui/custom_attribute.rs
new file mode 100644
index 000000000..495718422
--- /dev/null
+++ b/tests/ui/custom_attribute.rs
@@ -0,0 +1,9 @@
+#![feature(stmt_expr_attributes)]
+
+#[foo] //~ ERROR cannot find attribute `foo` in this scope
+fn main() {
+ #[foo] //~ ERROR cannot find attribute `foo` in this scope
+ let x = ();
+ #[foo] //~ ERROR cannot find attribute `foo` in this scope
+ x
+}