mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
21 lines
497 B
Rust
21 lines
497 B
Rust
//@ check-pass
|
|
|
|
#![warn(unused)]
|
|
|
|
macro_rules! foo {
|
|
() => {}
|
|
}
|
|
|
|
fn main() {
|
|
#[inline] foo!(); //~ WARN unused attribute `inline`
|
|
|
|
// This does nothing, since `#[allow(warnings)]` is itself
|
|
// an inert attribute on a macro call
|
|
#[allow(warnings)] #[inline] foo!(); //~ WARN unused attribute `allow`
|
|
//~^ WARN unused attribute `inline`
|
|
|
|
// This does work, since the attribute is on a parent
|
|
// of the macro invocation.
|
|
#[allow(warnings)] { #[inline] foo!(); }
|
|
}
|