rust/tests/ui/check-cfg/compact-values.rs
Urgau 4c1671674e Avoid target_os and target_arch in some check-cfg tests
as they unnecessarily clutter the diagnostic output and make the
experience of adding a new target to the compiler more painful than
it should be.

target_os and target_arch are still being tested in the
well-known-values.rs test, but in one place.
2023-12-09 11:59:46 +01:00

16 lines
374 B
Rust

// This test check that we correctly emit an warning for compact cfg
//
// check-pass
// compile-flags: --check-cfg=cfg() -Z unstable-options
#![feature(cfg_target_compact)]
#[cfg(target(os = "linux", arch = "arm"))]
pub fn expected() {}
#[cfg(target(os = "linux", pointer_width = "X"))]
//~^ WARNING unexpected `cfg` condition value
pub fn unexpected() {}
fn main() {}