rust/tests/ui/check-cfg/values-target-json.rs
Urgau 517374150c compiletest: add no-auto-check-cfg directive
this directive prevents compiletest from adding any implicit and
automatic --check-cfg arguments
2024-05-04 11:30:38 +02:00

19 lines
470 B
Rust

// This test checks that we don't lint values defined by a custom target (target json)
//
//@ check-pass
//@ no-auto-check-cfg
//@ needs-llvm-components: x86
//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json
#![feature(lang_items, no_core, auto_traits)]
#![no_core]
#[lang = "sized"]
trait Sized {}
#[cfg(target_os = "linux")]
fn target_os_linux() {}
#[cfg(target_os = "ericos")]
fn target_os_ericos() {}