Skip to content

Commit

Permalink
Mention first and last macro in backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jul 19, 2022
1 parent 7d4daaa commit 30a9533
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/ui/diverging_sub_expression.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ error: sub-expression diverges
LL | _ => true || panic!("boo"),
| ^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
--> $DIR/diverging_sub_expression.rs:38:26
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/fallible_impl_from.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ note: potential failure(s)
|
LL | panic!();
| ^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: consider implementing `TryFrom` instead
--> $DIR/fallible_impl_from.rs:35:1
Expand All @@ -65,7 +65,7 @@ LL | } else if s.parse::<u32>().unwrap() != 42 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | panic!("{:?}", s);
| ^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: consider implementing `TryFrom` instead
--> $DIR/fallible_impl_from.rs:53:1
Expand All @@ -87,7 +87,7 @@ LL | if s.parse::<u32>().ok().unwrap() != 42 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | panic!("{:?}", s);
| ^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 4 previous errors

4 changes: 2 additions & 2 deletions tests/ui/issue-7447.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ LL | byte_view(panic!());
| ^^^^^^^^
|
= note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
--> $DIR/issue-7447.rs:24:19
|
LL | group_entries(panic!());
| ^^^^^^^^
|
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 2 previous errors

0 comments on commit 30a9533

Please sign in to comment.