diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-06-10 10:36:21 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-06-10 10:38:14 +0000 |
| commit | 8475a4b0c6adce70940617ea5bbb5b691d50d975 (patch) | |
| tree | 1431c84eed930bb6857303cd804621712b2e49c1 | |
| parent | 11b538840f62434e5d04aef3b4966a5caccbfc55 (diff) | |
| download | rust-8475a4b0c6adce70940617ea5bbb5b691d50d975.tar.gz rust-8475a4b0c6adce70940617ea5bbb5b691d50d975.zip | |
Check that custom attributes are disallowed on statements and expressions
| -rw-r--r-- | src/test/compile-fail/custom_attribute.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/compile-fail/custom_attribute.rs b/src/test/compile-fail/custom_attribute.rs index 4e089a4e59c..eff734230ee 100644 --- a/src/test/compile-fail/custom_attribute.rs +++ b/src/test/compile-fail/custom_attribute.rs @@ -8,7 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(stmt_expr_attributes)] + #[foo] //~ ERROR The attribute `foo` fn main() { - + #[foo] //~ ERROR The attribute `foo` + let x = (); + #[foo] //~ ERROR The attribute `foo` + x } |
