Check that custom attributes are disallowed on statements and expressions

This commit is contained in:
Jeffrey Seyfried 2016-06-10 10:36:21 +00:00
parent 11b538840f
commit 8475a4b0c6

View File

@ -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
}