about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-cfg-target-compact.rs
blob: e9dd81cea1bfd0d9c9d779d63db1909fd06e8279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#[cfg(target(os = "linux"))] //~ ERROR compact `cfg(target(..))` is experimental
struct Foo(u64, u64);

#[cfg_attr(target(os = "linux"), non_exhaustive)] //~ ERROR compact `cfg(target(..))` is experimental
struct Bar(u64, u64);

#[cfg(not(any(all(target(os = "linux")))))] //~ ERROR compact `cfg(target(..))` is experimental
fn foo() {}

fn main() {
    cfg!(target(os = "linux"));
    //~^ ERROR compact `cfg(target(..))` is experimental and subject to change
}