mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
18 lines
538 B
Rust
18 lines
538 B
Rust
// Check that no warning is emitted for unknown cfg value
|
|
//
|
|
//@ check-pass
|
|
//@ revisions: simple mixed with_values
|
|
//@ compile-flags: -Z unstable-options
|
|
//@ 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() {}
|