diff options
Diffstat (limited to 'tests/ui/attr-usage-inline.rs')
| -rw-r--r-- | tests/ui/attr-usage-inline.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/attr-usage-inline.rs b/tests/ui/attr-usage-inline.rs new file mode 100644 index 00000000000..674c12454cd --- /dev/null +++ b/tests/ui/attr-usage-inline.rs @@ -0,0 +1,25 @@ +#![allow(dead_code)] + +#[inline] +fn f() {} + +#[inline] //~ ERROR: attribute should be applied to function or closure +struct S; + +struct I { + #[inline] + i: u8, +} + +#[macro_export] +#[inline] +macro_rules! m_e { + () => {}; +} + +#[inline] //~ ERROR: attribute should be applied to function or closure +macro_rules! m { + () => {}; +} + +fn main() {} |
