mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
24 lines
452 B
Rust
24 lines
452 B
Rust
// Test that the macro backtrace facility works
|
|
//@ aux-build:ping.rs
|
|
//@ revisions: default -Zmacro-backtrace
|
|
//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace
|
|
|
|
#[macro_use] extern crate ping;
|
|
|
|
// a local macro
|
|
macro_rules! pong {
|
|
() => { syntax error };
|
|
}
|
|
//~^^ ERROR expected one of
|
|
//~| ERROR expected one of
|
|
//~| ERROR expected one of
|
|
|
|
#[allow(non_camel_case_types)]
|
|
struct syntax;
|
|
|
|
fn main() {
|
|
pong!();
|
|
ping!();
|
|
deep!();
|
|
}
|