Skip to content

Commit 915e442

Browse files
committed
Do not suggest using -Zmacro-backtrace for builtin macros
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
1 parent 650b7d9 commit 915e442

7 files changed

+0
-16
lines changed

tests/ui/derive_ord_xor_partial_ord.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | impl PartialOrd for DeriveOrd {
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= note: `-D clippy::derive-ord-xor-partial-ord` implied by `-D warnings`
1313
= help: to override `-D warnings` add `#[allow(clippy::derive_ord_xor_partial_ord)]`
14-
= note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
1514

1615
error: you are deriving `Ord` but have implemented `PartialOrd` explicitly
1716
--> tests/ui/derive_ord_xor_partial_ord.rs:33:10
@@ -24,7 +23,6 @@ note: `PartialOrd` implemented here
2423
|
2524
LL | impl PartialOrd<DeriveOrdWithExplicitTypeVariable> for DeriveOrdWithExplicitTypeVariable {
2625
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27-
= note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
2826

2927
error: you are implementing `Ord` explicitly but have derived `PartialOrd`
3028
--> tests/ui/derive_ord_xor_partial_ord.rs:47:1
@@ -42,7 +40,6 @@ note: `PartialOrd` implemented here
4240
|
4341
LL | #[derive(PartialOrd, PartialEq, Eq)]
4442
| ^^^^^^^^^^
45-
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
4643

4744
error: you are implementing `Ord` explicitly but have derived `PartialOrd`
4845
--> tests/ui/derive_ord_xor_partial_ord.rs:69:5
@@ -60,7 +57,6 @@ note: `PartialOrd` implemented here
6057
|
6158
LL | #[derive(PartialOrd, PartialEq, Eq)]
6259
| ^^^^^^^^^^
63-
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
6460

6561
error: aborting due to 4 previous errors
6662

tests/ui/derived_hash_with_manual_eq.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ note: `PartialEq` implemented here
1010
LL | impl PartialEq for Bar {
1111
| ^^^^^^^^^^^^^^^^^^^^^^
1212
= note: `#[deny(clippy::derived_hash_with_manual_eq)]` on by default
13-
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
1413

1514
error: you are deriving `Hash` but have implemented `PartialEq` explicitly
1615
--> tests/ui/derived_hash_with_manual_eq.rs:23:10
@@ -23,7 +22,6 @@ note: `PartialEq` implemented here
2322
|
2423
LL | impl PartialEq<Baz> for Baz {
2524
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
26-
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
2725

2826
error: aborting due to 2 previous errors
2927

tests/ui/diverging_sub_expression.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ error: sub-expression diverges
3636
|
3737
LL | _ => true || panic!("boo"),
3838
| ^^^^^^^^^^^^^
39-
|
40-
= 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)
4139

4240
error: sub-expression diverges
4341
--> tests/ui/diverging_sub_expression.rs:52:29

tests/ui/fallible_impl_from.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ note: potential failure(s)
3838
|
3939
LL | panic!();
4040
| ^^^^^^^^
41-
= 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)
4241

4342
error: consider implementing `TryFrom` instead
4443
--> tests/ui/fallible_impl_from.rs:40:1
@@ -64,7 +63,6 @@ LL | } else if s.parse::<u32>().unwrap() != 42 {
6463
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6564
LL | panic!("{:?}", s);
6665
| ^^^^^^^^^^^^^^^^^
67-
= 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)
6866

6967
error: consider implementing `TryFrom` instead
7068
--> tests/ui/fallible_impl_from.rs:60:1
@@ -85,7 +83,6 @@ LL | if s.parse::<u32>().ok().unwrap() != 42 {
8583
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8684
LL | panic!("{:?}", s);
8785
| ^^^^^^^^^^^^^^^^^
88-
= 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)
8986

9087
error: aborting due to 4 previous errors
9188

tests/ui/impl_hash_with_borrow_str_and_bytes.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ LL | #[derive(Hash)]
2323
= note: ... as (`hash("abc") != hash("abc".as_bytes())`
2424
= help: consider either removing one of the `Borrow` implementations (`Borrow<str>` or `Borrow<[u8]>`) ...
2525
= help: ... or not implementing `Hash` for this type
26-
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
2726

2827
error: the semantics of `Borrow<T>` around `Hash` can't be satisfied when both `Borrow<str>` and `Borrow<[u8]>` are implemented
2928
--> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:117:6

tests/ui/issue-7447.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ LL | byte_view(panic!());
66
|
77
= note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
88
= help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
9-
= 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)
109

1110
error: sub-expression diverges
1211
--> tests/ui/issue-7447.rs:29:19
1312
|
1413
LL | group_entries(panic!());
1514
| ^^^^^^^^
16-
|
17-
= 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)
1815

1916
error: aborting due to 2 previous errors
2017

tests/ui/same_name_method.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ note: existing `clone` defined here
2323
|
2424
LL | #[derive(Clone)]
2525
| ^^^^^
26-
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
2726

2827
error: method's name is the same as an existing method in a trait
2928
--> tests/ui/same_name_method.rs:46:13

0 commit comments

Comments
 (0)