mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +00:00

minicore makes it much easier to add new language items to all of the existing `no_core` tests.
20 lines
496 B
Rust
20 lines
496 B
Rust
// This test checks that we don't lint values defined by a custom target (target json)
|
|
//
|
|
//@ add-core-stubs
|
|
//@ 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]
|
|
|
|
extern crate minicore;
|
|
use minicore::*;
|
|
|
|
#[cfg(target_os = "linux")]
|
|
fn target_os_linux() {}
|
|
|
|
#[cfg(target_os = "ericos")]
|
|
fn target_os_ericos() {}
|