From 4c7eb59e8161fd7bd2da89fc8c8d73c32bcd789b Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Mon, 16 Dec 2019 15:56:47 +0200 Subject: rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. --- src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr | 4 ++++ src/test/ui/parser/macro/issue-37113.stderr | 2 ++ src/test/ui/parser/macro/issue-37234.stderr | 2 ++ src/test/ui/parser/macro/macro-incomplete-parse.stderr | 2 ++ src/test/ui/parser/macro/pub-item-macro.stderr | 2 ++ src/test/ui/parser/macro/trait-non-item-macros.stderr | 2 ++ src/test/ui/parser/mut-patterns.stderr | 2 ++ src/test/ui/parser/recover-range-pats.stderr | 6 ++++++ 8 files changed, 22 insertions(+) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr b/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr index dd193d6a86e..40599d228b2 100644 --- a/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr +++ b/src/test/ui/parser/issue-65122-mac-invoc-in-mut-patterns.stderr @@ -8,6 +8,7 @@ LL | mac1! { does_not_exist!() } | --------------------------- in this macro invocation | = note: `mut` may be followed by `variable` and `variable @ pattern` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected identifier, found `does_not_exist!()` --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:17 @@ -17,6 +18,8 @@ LL | let mut $eval = (); ... LL | mac2! { does_not_exist!() } | --------------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `mut` must be followed by a named binding --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:13 @@ -28,6 +31,7 @@ LL | mac2! { does_not_exist!() } | --------------------------- in this macro invocation | = note: `mut` may be followed by `variable` and `variable @ pattern` + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find macro `does_not_exist` in this scope --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:20:13 diff --git a/src/test/ui/parser/macro/issue-37113.stderr b/src/test/ui/parser/macro/issue-37113.stderr index 7aadc0aa4b5..20ee9d35ec7 100644 --- a/src/test/ui/parser/macro/issue-37113.stderr +++ b/src/test/ui/parser/macro/issue-37113.stderr @@ -6,6 +6,8 @@ LL | $( $t, )* ... LL | test_macro!(String,); | --------------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/macro/issue-37234.stderr b/src/test/ui/parser/macro/issue-37234.stderr index 8cef5ae3758..2db0f848f75 100644 --- a/src/test/ui/parser/macro/issue-37234.stderr +++ b/src/test/ui/parser/macro/issue-37234.stderr @@ -6,6 +6,8 @@ LL | let x = 5 ""; ... LL | failed!(); | ---------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/macro/macro-incomplete-parse.stderr b/src/test/ui/parser/macro/macro-incomplete-parse.stderr index 46cccba74c0..c9d220b1a27 100644 --- a/src/test/ui/parser/macro/macro-incomplete-parse.stderr +++ b/src/test/ui/parser/macro/macro-incomplete-parse.stderr @@ -17,6 +17,8 @@ LL | () => ( 1, ... LL | ignored_expr!(); | ---------------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:16:14 diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index ae981ac4cbe..49644cf6a0e 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -8,6 +8,7 @@ LL | pub_x!(); | --------- in this macro invocation | = help: try adjusting the macro to put `pub` inside the invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0603]: static `x` is private --> $DIR/pub-item-macro.rs:17:23 @@ -23,6 +24,7 @@ LL | static x: u32 = 0; ... LL | pub_x!(); | --------- in this macro invocation + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/macro/trait-non-item-macros.stderr b/src/test/ui/parser/macro/trait-non-item-macros.stderr index 7647ba500e0..5a89b5b936f 100644 --- a/src/test/ui/parser/macro/trait-non-item-macros.stderr +++ b/src/test/ui/parser/macro/trait-non-item-macros.stderr @@ -6,6 +6,8 @@ LL | ($a:expr) => ($a) ... LL | bah!(2); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/parser/mut-patterns.stderr b/src/test/ui/parser/mut-patterns.stderr index a0e290a834d..5f4c349d7d6 100644 --- a/src/test/ui/parser/mut-patterns.stderr +++ b/src/test/ui/parser/mut-patterns.stderr @@ -99,6 +99,8 @@ LL | let mut $p = 0; ... LL | foo!(x); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 12 previous errors diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr index 50bfbcec247..0d4db74f9f4 100644 --- a/src/test/ui/parser/recover-range-pats.stderr +++ b/src/test/ui/parser/recover-range-pats.stderr @@ -166,6 +166,8 @@ LL | let ...$e; ... LL | mac!(0); | -------- in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end --> $DIR/recover-range-pats.rs:141:19 @@ -177,6 +179,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end --> $DIR/recover-range-pats.rs:142:19 @@ -188,6 +191,7 @@ LL | mac!(0); | -------- in this macro invocation | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: `...` range patterns are deprecated --> $DIR/recover-range-pats.rs:42:13 @@ -251,6 +255,8 @@ LL | let $e1...$e2; ... LL | mac2!(0, 1); | ------------ in this macro invocation + | + = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/recover-range-pats.rs:20:12 -- cgit 1.4.1-3-g733a5