rust/tests/ui/macros/cfg.rs

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

7 lines
275 B
Rust
Raw Normal View History

fn main() {
cfg!(); //~ ERROR macro requires a cfg-pattern
cfg!(123); //~ ERROR literal in `cfg` predicate value must be a boolean
cfg!(foo = 123); //~ ERROR literal in `cfg` predicate value must be a string
2022-06-21 18:28:22 +00:00
cfg!(foo, bar); //~ ERROR expected 1 cfg-pattern
}