rust/tests/ui/feature-gates/feature-gate-cfg-target-abi.rs
2023-01-11 09:32:08 +00:00

14 lines
402 B
Rust

#[cfg(target_abi = "x")] //~ ERROR `cfg(target_abi)` is experimental
struct Foo(u64, u64);
#[cfg_attr(target_abi = "x", x)] //~ ERROR `cfg(target_abi)` is experimental
struct Bar(u64, u64);
#[cfg(not(any(all(target_abi = "x"))))] //~ ERROR `cfg(target_abi)` is experimental
fn foo() {}
fn main() {
cfg!(target_abi = "x");
//~^ ERROR `cfg(target_abi)` is experimental and subject to change
}