about summary refs log tree commit diff
path: root/tests/ui/tool-attributes/duplicate-diagnostic.rs
blob: c36179611afcc921dbe6a0ddbcb4874714438006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ aux-build: p1.rs
//@ aux-build: p2.rs

#![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`
                  //~^ NOTE the diagnostic item is first defined in crate `p2`
fn main() {}

//~? ERROR duplicate diagnostic item in crate `p2`
//~? NOTE the diagnostic item is first defined in crate `p1`