mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
22 lines
368 B
Rust
22 lines
368 B
Rust
// Meta test for compiletest: check that when we give the right error
|
|
// patterns, the test passes. See all `revision-bad.rs`.
|
|
|
|
//@ run-fail
|
|
//@ revisions: foo bar
|
|
//@[foo] error-pattern:foo
|
|
//@[bar] error-pattern:bar
|
|
//@ ignore-emscripten no processes
|
|
|
|
#[cfg(foo)]
|
|
fn die() {
|
|
panic!("foo");
|
|
}
|
|
#[cfg(bar)]
|
|
fn die() {
|
|
panic!("bar");
|
|
}
|
|
|
|
fn main() {
|
|
die();
|
|
}
|