diff options
Diffstat (limited to 'tests/ui/attributes/attr_unknown_custom_attr.rs')
| -rw-r--r-- | tests/ui/attributes/attr_unknown_custom_attr.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/attributes/attr_unknown_custom_attr.rs b/tests/ui/attributes/attr_unknown_custom_attr.rs new file mode 100644 index 00000000000..cdbe48a636f --- /dev/null +++ b/tests/ui/attributes/attr_unknown_custom_attr.rs @@ -0,0 +1,11 @@ +//! Checks error handling for undefined custom attributes. + +#![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 +} |
