mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
12 lines
296 B
Rust
12 lines
296 B
Rust
// Check that `#[cfg_attr($PREDICATE,)]` triggers the `unused_attribute` lint.
|
|
|
|
#![deny(unused)]
|
|
|
|
#[cfg_attr(FALSE,)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
|
|
fn _f() {}
|
|
|
|
#[cfg_attr(not(FALSE),)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
|
|
fn _g() {}
|
|
|
|
fn main() {}
|