Files
rust/tests/ui/cfg/cfg-path-error.rs
T
Jonathan Brouwer 090dad00a9 Changes in uitests for cfg_attr
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-10-15 22:18:18 +02:00

30 lines
733 B
Rust

//@ check-fail
#![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() {}