Merge the two diagnostics.

This commit is contained in:
Camille GILLOT 2023-02-26 10:29:25 +00:00
parent 11fbb57395
commit 752ddd028c
5 changed files with 21 additions and 32 deletions

View file

@ -9,5 +9,5 @@ extern crate p1;
extern crate p2;
#[rustc_diagnostic_item = "Foo"]
pub struct Foo {} //~ ERROR duplicate diagnostic item found
pub struct Foo {} //~ ERROR duplicate diagnostic item in crate `duplicate_diagnostic`: `Foo`
fn main() {}

View file

@ -2,11 +2,13 @@ error: duplicate diagnostic item in crate `p2`: `Foo`.
|
= note: the diagnostic item is first defined in crate `p1`.
error: duplicate diagnostic item found: `Foo`.
error: duplicate diagnostic item in crate `duplicate_diagnostic`: `Foo`.
--> $DIR/duplicate-diagnostic.rs:12:1
|
LL | pub struct Foo {}
| ^^^^^^^^^^^^^^
|
= note: the diagnostic item is first defined in crate `p2`.
error: aborting due to 2 previous errors