1 // compile-flags: -Z deduplicate-diagnostics=yes
3 #![warn(unused_imports)]
6 //~^ NOTE `from_utf8` is imported here, but it is a function
7 //~| NOTE `from_utf8_mut` is imported here, but it is a function
8 //~| NOTE `from_utf8_unchecked` is imported here, but it is a function
11 pub trait Serialize {}
12 pub trait Deserialize {}
17 use hey::{Serialize, Deserialize, X};
18 //~^ NOTE `Serialize` is imported here, but it is only a trait, without a derive macro
19 //~| NOTE `Deserialize` is imported here, but it is a trait
20 //~| NOTE `X` is imported here, but it is a struct
23 //~^ ERROR cannot find derive macro `Serialize`
26 #[derive(from_utf8_mut)]
27 //~^ ERROR cannot find derive macro `from_utf8_mut`
31 //~^ ERROR cannot find derive macro `println`
32 //~| NOTE `println` is in scope, but it is a function-like macro
36 //~^ ERROR cannot find attribute `Deserialize`
39 #[from_utf8_unchecked]
40 //~^ ERROR cannot find attribute `from_utf8_unchecked`
44 //~^ ERROR cannot find attribute `println`
45 //~| NOTE `println` is in scope, but it is a function-like macro
50 //~^ ERROR cannot find macro `from_utf8`
53 //~^ ERROR cannot find macro `Box`
54 //~| NOTE `Box` is in scope, but it is a struct
57 //~^ ERROR cannot find macro `Copy`
58 //~| NOTE `Copy` is in scope, but it is a derive macro
61 //~^ ERROR cannot find macro `test`
62 //~| NOTE `test` is in scope, but it is an attribute
65 //~^ ERROR cannot find macro `X`