Files
rust/tests/ui/cfg/cfg-path-error.rs
T
2026-03-05 22:45:17 -08:00

31 lines
764 B
Rust

//@ check-fail
//@ reference: cfg.option-spec
#![allow(unexpected_cfgs)] // invalid cfgs
#[cfg(any(foo, foo::bar))]
//~^ ERROR malformed `cfg` attribute input
//~| NOTE expected a valid identifier here
//~| NOTE for more information, visit
fn foo1() {}
#[cfg(any(foo::bar, foo))]
//~^ ERROR malformed `cfg` attribute input
//~| NOTE expected a valid identifier here
//~| NOTE for more information, visit
fn foo2() {}
#[cfg(all(foo, foo::bar))]
//~^ ERROR malformed `cfg` attribute input
//~| NOTE expected a valid identifier here
//~| NOTE for more information, visit
fn foo3() {}
#[cfg(all(foo::bar, foo))]
//~^ ERROR malformed `cfg` attribute input
//~| NOTE expected a valid identifier here
//~| NOTE for more information, visit
fn foo4() {}
fn main() {}