summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macro_backtrace/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/macro_backtrace/main.rs')
-rw-r--r--src/test/ui/macro_backtrace/main.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/macro_backtrace/main.rs b/src/test/ui/macro_backtrace/main.rs
new file mode 100644
index 000000000..6cee3b4cd
--- /dev/null
+++ b/src/test/ui/macro_backtrace/main.rs
@@ -0,0 +1,23 @@
+// 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!();
+}