rust/tests/ui/cfg/raw-true-false.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
239 B
Rust
Raw Permalink Normal View History

//@ check-pass
//@ compile-flags: --cfg false --check-cfg=cfg(r#false)
#![deny(warnings)]
#[expect(unexpected_cfgs)]
mod a {
#[cfg(r#true)]
pub fn foo() {}
}
mod b {
#[cfg(r#false)]
pub fn bar() {}
}
fn main() {
b::bar()
}