rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.

This commit is contained in:
Eduard-Mihai Burtescu 2019-12-16 15:56:47 +02:00
parent ab080973cb
commit 4c7eb59e81
280 changed files with 888 additions and 119 deletions

View file

@ -15,6 +15,8 @@ LL | #[derive(Copy)]
LL | struct Foo2<'a> {
LL | ty: &'a mut bool,
| ---------------- this field does not implement `Copy`
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0204]: the trait `Copy` may not be implemented for this type
--> $DIR/E0204.rs:17:6
@ -33,6 +35,8 @@ LL | #[derive(Copy)]
LL | enum EFoo2<'a> {
LL | Bar(&'a mut bool),
| ------------ this field does not implement `Copy`
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 4 previous errors

View file

@ -49,7 +49,7 @@ error[E0308]: mismatched types
LL | s = format!("foo");
| ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `std::string::String`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 6 previous errors

View file

@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | stream.write_fmt(format!("message received"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -13,4 +13,5 @@ note: the lint level is defined here
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(dead_code)]` implied by `#[warn(unused)]`
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View file

@ -10,7 +10,7 @@ LL | y.use_ref();
| - borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error