mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
14 lines
321 B
Rust
14 lines
321 B
Rust
// Check that `#[cfg_attr($PREDICATE,)]` triggers the `unused_attribute` lint.
|
|
|
|
//@ compile-flags: --cfg TRUE
|
|
|
|
#![deny(unused)]
|
|
|
|
#[cfg_attr(FALSE,)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
|
|
fn _f() {}
|
|
|
|
#[cfg_attr(TRUE,)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
|
|
fn _g() {}
|
|
|
|
fn main() {}
|