2018-03-27 10:39:15 -05:00
|
|
|
#![feature(stmt_expr_attributes)]
|
|
|
|
|
2018-03-22 10:57:26 -05:00
|
|
|
fn main() {
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
let _a = 4;
|
2018-04-27 00:20:46 -05:00
|
|
|
//~^^ ERROR attribute should be applied to function or closure
|
2018-03-22 10:57:26 -05:00
|
|
|
|
|
|
|
|
|
|
|
#[inline(XYZ)]
|
|
|
|
let _b = 4;
|
2018-04-27 00:20:46 -05:00
|
|
|
//~^^ ERROR attribute should be applied to function or closure
|
2018-03-22 10:57:26 -05:00
|
|
|
|
|
|
|
#[repr(nothing)]
|
|
|
|
let _x = 0;
|
2021-01-20 20:49:04 -06:00
|
|
|
//~^^ ERROR E0552
|
2018-03-22 10:57:26 -05:00
|
|
|
|
|
|
|
#[repr(something_not_real)]
|
|
|
|
loop {
|
|
|
|
()
|
|
|
|
};
|
2021-01-20 20:49:04 -06:00
|
|
|
//~^^^^ ERROR E0552
|
2018-03-22 10:57:26 -05:00
|
|
|
|
|
|
|
#[repr]
|
|
|
|
let _y = "123";
|
2020-09-10 13:54:17 -05:00
|
|
|
//~^^ ERROR malformed `repr` attribute
|
2018-03-26 21:41:19 -05:00
|
|
|
|
|
|
|
fn foo() {}
|
|
|
|
|
|
|
|
#[inline(ABC)]
|
|
|
|
foo();
|
2018-04-27 00:20:46 -05:00
|
|
|
//~^^ ERROR attribute should be applied to function or closure
|
2018-03-27 10:39:15 -05:00
|
|
|
|
|
|
|
let _z = #[repr] 1;
|
2020-09-10 13:54:17 -05:00
|
|
|
//~^ ERROR malformed `repr` attribute
|
2018-03-22 10:57:26 -05:00
|
|
|
}
|