From 8475a4b0c6adce70940617ea5bbb5b691d50d975 Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Fri, 10 Jun 2016 10:36:21 +0000 Subject: [PATCH] Check that custom attributes are disallowed on statements and expressions --- src/test/compile-fail/custom_attribute.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 }