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