rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.
This commit is contained in:
parent
ab080973cb
commit
4c7eb59e81
280 changed files with 888 additions and 119 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue