summaryrefslogtreecommitdiffstats
path: root/tests/ui/tool-attributes/duplicate-diagnostic.rs
blob: e2cf9508757be7545ed92e75cf8ac602ceb9589d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// aux-build: p1.rs
// aux-build: p2.rs

// error-pattern: duplicate diagnostic item in crate `p2`
// error-pattern: note: the diagnostic item is first defined in crate `p1`

#![feature(rustc_attrs)]
extern crate p1;
extern crate p2;

#[rustc_diagnostic_item = "Foo"]
pub struct Foo {} //~ ERROR duplicate diagnostic item in crate `duplicate_diagnostic`: `Foo`
fn main() {}