summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/values-target-json.rs
blob: 2ef5a44592b8133aeca40ccdf4442b02e2f7acab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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() {}