mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 10:55:14 +00:00

this directive prevents compiletest from adding any implicit and automatic --check-cfg arguments
17 lines
378 B
Rust
17 lines
378 B
Rust
// This test check that we correctly emit an warning for compact cfg
|
|
//
|
|
//@ check-pass
|
|
//@ no-auto-check-cfg
|
|
//@ compile-flags: --check-cfg=cfg()
|
|
|
|
#![feature(cfg_target_compact)]
|
|
|
|
#[cfg(target(os = "linux", arch = "arm"))]
|
|
pub fn expected() {}
|
|
|
|
#[cfg(target(os = "linux", architecture = "arm"))]
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
pub fn unexpected() {}
|
|
|
|
fn main() {}
|