2023-05-01 07:16:38 -05:00
|
|
|
// Check that no warning is emitted for unknown cfg value
|
|
|
|
//
|
|
|
|
//@ check-pass
|
2024-04-09 07:07:30 -05:00
|
|
|
//@ no-auto-check-cfg
|
2023-05-01 07:16:38 -05:00
|
|
|
//@ revisions: simple mixed with_values
|
|
|
|
//@ compile-flags: --check-cfg=cfg(simple,mixed,with_values)
|
|
|
|
//@ [simple]compile-flags: --check-cfg=cfg(foo,values(any()))
|
|
|
|
//@ [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any()))
|
|
|
|
//@ [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa"))
|
|
|
|
|
|
|
|
#[cfg(foo = "value")]
|
|
|
|
pub fn f() {}
|
|
|
|
|
|
|
|
#[cfg(foo)]
|
|
|
|
pub fn f() {}
|
|
|
|
|
|
|
|
fn main() {}
|