-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50656c8
commit ae92083
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This test checks that the "ignore-cfg" compiletest option is evaluated | ||
// based on the "--target" option in "compile-flags", rather than | ||
// the default platform. | ||
// | ||
// compile-flags: --target x86_64-unknown-linux-gnu | ||
// needs-llvm-components: x86 | ||
// ignore-cfg: target_os=linux | ||
// check-pass | ||
|
||
compile_error!("this should never be compiled"); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// This test checks that the "ignore-cfg" compiletest option matches | ||
// up with rustc's builtin evaluation of cfgs. | ||
// | ||
// ignore-cfg: target_family=unix | ||
// check-pass | ||
|
||
#[cfg(target_family = "unix")] | ||
compile_error!("this shouldn't be compiled on unix"); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// This test checks that the "ignore-cfg" compiletest option matches | ||
// up with rustc's builtin evaluation of cfgs. | ||
// | ||
// only-cfg: target_family=unix | ||
// check-pass | ||
|
||
#[cfg(not(target_family = "unix"))] | ||
compile_error!("this should only be compiled on unix"); | ||
|
||
fn main() {} |