Skip to content

Commit 2b8fec4

Browse files
committed
Add a note to duplicate diagnostics
1 parent 2ffeb46 commit 2b8fec4

File tree

152 files changed

+406
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+406
-169
lines changed

compiler/rustc_errors/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,16 +1376,16 @@ impl HandlerInner {
13761376
self.emitted_diagnostic_codes.insert(code.clone());
13771377
}
13781378

1379-
let already_emitted = |this: &mut Self| {
1379+
let already_emitted = {
13801380
let mut hasher = StableHasher::new();
13811381
diagnostic.hash(&mut hasher);
13821382
let diagnostic_hash = hasher.finish();
1383-
!this.emitted_diagnostics.insert(diagnostic_hash)
1383+
!self.emitted_diagnostics.insert(diagnostic_hash)
13841384
};
13851385

13861386
// Only emit the diagnostic if we've been asked to deduplicate or
13871387
// haven't already emitted an equivalent diagnostic.
1388-
if !(self.flags.deduplicate_diagnostics && already_emitted(self)) {
1388+
if !(self.flags.deduplicate_diagnostics && already_emitted) {
13891389
debug!(?diagnostic);
13901390
debug!(?self.emitted_diagnostics);
13911391
let already_emitted_sub = |sub: &mut SubDiagnostic| {
@@ -1401,6 +1401,9 @@ impl HandlerInner {
14011401
};
14021402

14031403
diagnostic.children.extract_if(already_emitted_sub).for_each(|_| {});
1404+
if already_emitted {
1405+
diagnostic.note("duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`");
1406+
}
14041407

14051408
self.emitter.emit_diagnostic(diagnostic);
14061409
if diagnostic.is_error() {

tests/ui/allocator/not-an-allocator.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ LL | static A: usize = 0;
1818
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
1919
|
2020
= help: the trait `GlobalAlloc` is implemented for `System`
21+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2122
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
2223

2324
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
@@ -29,6 +30,7 @@ LL | static A: usize = 0;
2930
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
3031
|
3132
= help: the trait `GlobalAlloc` is implemented for `System`
33+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3234
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
3335

3436
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
@@ -40,6 +42,7 @@ LL | static A: usize = 0;
4042
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
4143
|
4244
= help: the trait `GlobalAlloc` is implemented for `System`
45+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4346
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
4447

4548
error: aborting due to 4 previous errors

tests/ui/associated-consts/defaults-not-assumed-fail.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ note: erroneous constant encountered
2424
LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2626
|
27+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2728
= note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
2829

2930
error: aborting due to previous error

tests/ui/associated-inherent-types/issue-109789.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
1515
|
1616
= note: expected struct `Foo<fn(&'static ())>`
1717
found struct `Foo<for<'a> fn(&'a ())>`
18+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1819

1920
error: aborting due to 2 previous errors
2021

tests/ui/associated-type-bounds/duplicate.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
373373
| ---------- ^^^^^^^^^^ re-bound here
374374
| |
375375
| `Item` bound here first
376+
|
377+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
376378

377379
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
378380
--> $DIR/duplicate.rs:197:34
@@ -389,6 +391,8 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
389391
| ---------- ^^^^^^^^^^ re-bound here
390392
| |
391393
| `Item` bound here first
394+
|
395+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
392396

393397
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
394398
--> $DIR/duplicate.rs:200:37
@@ -405,6 +409,8 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
405409
| ------------- ^^^^^^^^^^^^^ re-bound here
406410
| |
407411
| `Item` bound here first
412+
|
413+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
408414

409415
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
410416
--> $DIR/duplicate.rs:205:29
@@ -445,6 +451,8 @@ LL | Self: Iterator<Item: Copy, Item: Send>,
445451
| ---------- ^^^^^^^^^^ re-bound here
446452
| |
447453
| `Item` bound here first
454+
|
455+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
448456

449457
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
450458
--> $DIR/duplicate.rs:230:32
@@ -461,6 +469,8 @@ LL | Self: Iterator<Item: Copy, Item: Copy>,
461469
| ---------- ^^^^^^^^^^ re-bound here
462470
| |
463471
| `Item` bound here first
472+
|
473+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
464474

465475
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
466476
--> $DIR/duplicate.rs:237:35
@@ -477,6 +487,8 @@ LL | Self: Iterator<Item: 'static, Item: 'static>,
477487
| ------------- ^^^^^^^^^^^^^ re-bound here
478488
| |
479489
| `Item` bound here first
490+
|
491+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
480492

481493
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
482494
--> $DIR/duplicate.rs:255:40

tests/ui/associated-types/hr-associated-type-bound-param-2.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ LL | trait Z<'a, T: ?Sized>
4545
...
4646
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
4747
| ^^^^^ required by this bound in `Z`
48+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4849

4950
error: aborting due to 3 previous errors
5051

tests/ui/async-await/drop-tracking-unresolved-typeck-results.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ LL | | });
2323
|
2424
= note: `fn(&'0 ()) -> std::future::Ready<&'0 ()> {std::future::ready::<&'0 ()>}` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`...
2525
= note: ...but it actually implements `FnOnce<(&(),)>`
26+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2627

2728
error: aborting due to 2 previous errors
2829

tests/ui/async-await/return-type-notation/issue-110963-early.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ note: the lifetime requirement is introduced here
4444
|
4545
LL | F: Future + Send + 'static,
4646
| ^^^^
47+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4748

4849
error: aborting due to 2 previous errors; 1 warning emitted
4950

tests/ui/borrowck/regions-bound-missing-bound-in-impl.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ note: ...does not necessarily outlive the lifetime `'c` as defined here
5353
|
5454
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
5555
| ^^
56+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
5657

5758
error[E0195]: lifetime parameters or bounds on method `wrong_bound2` do not match the trait declaration
5859
--> $DIR/regions-bound-missing-bound-in-impl.rs:42:20

tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ LL | #![cfg_attr(foo, crate_type="bin")]
2525
|
2626
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2727
= note: for more information, see issue #91632 <https://github.com/rust-lang/rust/issues/91632>
28+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2829

2930
error: `crate_name` within an `#![cfg_attr] attribute is deprecated`
3031
--> $DIR/future-compat-crate-attributes-using-cfg_attr.rs:9:18
@@ -34,6 +35,7 @@ LL | #![cfg_attr(foo, crate_name="bar")]
3435
|
3536
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3637
= note: for more information, see issue #91632 <https://github.com/rust-lang/rust/issues/91632>
38+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3739

3840
error: aborting due to 4 previous errors
3941

tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ LL | #[cfg(feature = $expr)]
7474
LL | generate_s10!(concat!("nonexistent"));
7575
| ------------------------------------- in this macro invocation
7676
|
77+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
7778
= note: this error originates in the macro `generate_s10` (in Nightly builds, run with -Z macro-backtrace for more info)
7879

7980
error: aborting due to 11 previous errors

tests/ui/const-generics/assoc_const_eq_diagnostic.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ note: associated constant defined here
3939
|
4040
LL | const MODE: Mode;
4141
| ^^^^^^^^^^^^^^^^
42+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4243

4344
error: aborting due to 4 previous errors
4445

tests/ui/const-generics/issues/issue-74950.min.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ LL | struct Outer<const I: Inner>;
1515
|
1616
= note: the only supported types are integers, `bool` and `char`
1717
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
18+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1819

1920
error: `Inner` is forbidden as the type of a const generic parameter
2021
--> $DIR/issue-74950.rs:20:23
@@ -24,6 +25,7 @@ LL | struct Outer<const I: Inner>;
2425
|
2526
= note: the only supported types are integers, `bool` and `char`
2627
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
28+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2729

2830
error: `Inner` is forbidden as the type of a const generic parameter
2931
--> $DIR/issue-74950.rs:20:23
@@ -33,6 +35,7 @@ LL | struct Outer<const I: Inner>;
3335
|
3436
= note: the only supported types are integers, `bool` and `char`
3537
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
38+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3639

3740
error: `Inner` is forbidden as the type of a const generic parameter
3841
--> $DIR/issue-74950.rs:20:23
@@ -42,6 +45,7 @@ LL | struct Outer<const I: Inner>;
4245
|
4346
= note: the only supported types are integers, `bool` and `char`
4447
= help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
48+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4549

4650
error: aborting due to 5 previous errors
4751

tests/ui/consts/const-err-late.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ note: erroneous constant encountered
2727
|
2828
LL | black_box((S::<i32>::FOO, S::<u32>::FOO));
2929
| ^^^^^^^^^^^^^
30+
|
31+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3032

3133
error: aborting due to 2 previous errors
3234

tests/ui/consts/const-eval/issue-44578.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ note: erroneous constant encountered
2424
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2626
|
27+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2728
= note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
2829

2930
error: aborting due to previous error

tests/ui/consts/const-eval/panic-assoc-never-type.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ note: erroneous constant encountered
1717
|
1818
LL | let _ = PrintName::VOID;
1919
| ^^^^^^^^^^^^^^^
20+
|
21+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2022

2123
error: aborting due to previous error
2224

tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.warn.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ help: the constant being evaluated
4040
|
4141
LL | const Y: u32 = simple_loop(35);
4242
| ^^^^^^^^^^^^
43+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4344

4445
warning: constant evaluation is taking a long time
4546
--> $DIR/ctfe-simple-loop.rs:9:5

tests/ui/consts/const_in_pattern/reject_non_structural.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Zdeduplicate-diagnostics=yes
2+
13
// This test of structural match checking enumerates the different kinds of
24
// const definitions, collecting cases where the const pattern is rejected.
35
//
@@ -78,9 +80,6 @@ fn main() {
7880
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
7981
//~| NOTE the traits must be derived
8082
//~| NOTE StructuralEq.html for details
81-
//~| ERROR must be annotated with `#[derive(PartialEq, Eq)]`
82-
//~| NOTE the traits must be derived
83-
//~| NOTE StructuralEq.html for details
8483

8584
trait Trait: Sized { const ASSOC: Option<Self>; }
8685
impl Trait for NoDerive { const ASSOC: Option<NoDerive> = Some(NoDerive); }
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
2-
--> $DIR/reject_non_structural.rs:40:36
2+
--> $DIR/reject_non_structural.rs:42:36
33
|
44
LL | match Derive::Some(NoDerive) { ENUM => dbg!(ENUM), _ => panic!("whoops"), };
55
| ^^^^
@@ -8,7 +8,7 @@ LL | match Derive::Some(NoDerive) { ENUM => dbg!(ENUM), _ => panic!("whoops"
88
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
99

1010
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
11-
--> $DIR/reject_non_structural.rs:46:28
11+
--> $DIR/reject_non_structural.rs:48:28
1212
|
1313
LL | match Some(NoDerive) { FIELD => dbg!(FIELD), _ => panic!("whoops"), };
1414
| ^^^^^
@@ -17,7 +17,7 @@ LL | match Some(NoDerive) { FIELD => dbg!(FIELD), _ => panic!("whoops"), };
1717
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
1818

1919
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
20-
--> $DIR/reject_non_structural.rs:53:27
20+
--> $DIR/reject_non_structural.rs:55:27
2121
|
2222
LL | match Some(NoDerive) {INDIRECT => dbg!(INDIRECT), _ => panic!("whoops"), };
2323
| ^^^^^^^^
@@ -26,7 +26,7 @@ LL | match Some(NoDerive) {INDIRECT => dbg!(INDIRECT), _ => panic!("whoops")
2626
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
2727

2828
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
29-
--> $DIR/reject_non_structural.rs:59:36
29+
--> $DIR/reject_non_structural.rs:61:36
3030
|
3131
LL | match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoops"), };
3232
| ^^^^^
@@ -35,7 +35,7 @@ LL | match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoop
3535
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
3636

3737
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
38-
--> $DIR/reject_non_structural.rs:65:28
38+
--> $DIR/reject_non_structural.rs:67:28
3939
|
4040
LL | match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
4141
| ^^^^^^^^^^^^^^^
@@ -44,7 +44,7 @@ LL | match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => p
4444
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
4545

4646
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
47-
--> $DIR/reject_non_structural.rs:71:36
47+
--> $DIR/reject_non_structural.rs:73:36
4848
|
4949
LL | match [None, Some(NoDerive)] { ARRAY => dbg!(ARRAY), _ => panic!("whoops"), };
5050
| ^^^^^
@@ -53,7 +53,7 @@ LL | match [None, Some(NoDerive)] { ARRAY => dbg!(ARRAY), _ => panic!("whoop
5353
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
5454

5555
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
56-
--> $DIR/reject_non_structural.rs:77:33
56+
--> $DIR/reject_non_structural.rs:79:33
5757
|
5858
LL | match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
5959
| ^^^^^^
@@ -62,16 +62,7 @@ LL | match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops
6262
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
6363

6464
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
65-
--> $DIR/reject_non_structural.rs:77:33
66-
|
67-
LL | match [Some(NoDerive); 2] { REPEAT => dbg!(REPEAT), _ => panic!("whoops"), };
68-
| ^^^^^^
69-
|
70-
= note: the traits must be derived, manual `impl`s are not sufficient
71-
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
72-
73-
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
74-
--> $DIR/reject_non_structural.rs:87:28
65+
--> $DIR/reject_non_structural.rs:86:28
7566
|
7667
LL | match Some(NoDerive) { NoDerive::ASSOC => dbg!(NoDerive::ASSOC), _ => panic!("whoops"), };
7768
| ^^^^^^^^^^^^^^^
@@ -80,7 +71,7 @@ LL | match Some(NoDerive) { NoDerive::ASSOC => dbg!(NoDerive::ASSOC), _ => p
8071
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
8172

8273
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
83-
--> $DIR/reject_non_structural.rs:93:28
74+
--> $DIR/reject_non_structural.rs:92:28
8475
|
8576
LL | match Some(NoDerive) { BLOCK => dbg!(BLOCK), _ => panic!("whoops"), };
8677
| ^^^^^
@@ -89,7 +80,7 @@ LL | match Some(NoDerive) { BLOCK => dbg!(BLOCK), _ => panic!("whoops"), };
8980
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
9081

9182
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
92-
--> $DIR/reject_non_structural.rs:99:29
83+
--> $DIR/reject_non_structural.rs:98:29
9384
|
9485
LL | match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };
9586
| ^^^^^^^
@@ -99,10 +90,10 @@ LL | match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops")
9990
= note: the traits must be derived, manual `impl`s are not sufficient
10091
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
10192
note: the lint level is defined here
102-
--> $DIR/reject_non_structural.rs:12:9
93+
--> $DIR/reject_non_structural.rs:14:9
10394
|
10495
LL | #![warn(indirect_structural_match)]
10596
| ^^^^^^^^^^^^^^^^^^^^^^^^^
10697

107-
error: aborting due to 10 previous errors; 1 warning emitted
98+
error: aborting due to 9 previous errors; 1 warning emitted
10899

tests/ui/consts/enum-discr-type-err.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ LL | | B = T,
2424
LL | | }
2525
| |_- in this macro invocation
2626
|
27+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2728
= note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
2829

2930
error: aborting due to 2 previous errors

0 commit comments

Comments
 (0)