From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/check-cfg/values-target-json.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/check-cfg/values-target-json.rs (limited to 'tests/ui/check-cfg/values-target-json.rs') diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs new file mode 100644 index 000000000..2ef5a4459 --- /dev/null +++ b/tests/ui/check-cfg/values-target-json.rs @@ -0,0 +1,21 @@ +// This test checks that we don't lint values defined by a custom target (target json) +// +// check-pass +// needs-llvm-components: x86 +// compile-flags: --crate-type=lib --check-cfg=values() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options + +#![feature(lang_items, no_core, auto_traits)] +#![no_core] + +#[lang = "sized"] +trait Sized {} + +#[cfg(target_os = "linuz")] +//~^ WARNING unexpected `cfg` condition value +fn target_os_linux_misspell() {} + +#[cfg(target_os = "linux")] +fn target_os_linux() {} + +#[cfg(target_os = "ericos")] +fn target_os_ericos() {} -- cgit v1.2.3