@@ -17,19 +17,19 @@ use std::mem::*; // shouldn't get errors for not using
1717 // everything imported
1818
1919// Should get errors for both 'Some' and 'None'
20- use std:: option:: Option :: { Some , None } ; //~ ERROR unused import
21- //~^ ERROR unused import
20+ use std:: option:: Option :: { Some , None } ; //~ ERROR unused import: `Some`
21+ //~^ ERROR unused import: `None`
2222
23- use test:: A ; //~ ERROR unused import
23+ use test:: A ; //~ ERROR unused import: `test::A`
2424// Be sure that if we just bring some methods into scope that they're also
2525// counted as being used.
2626use test:: B ;
2727// But only when actually used: do not get confused by the method with the same name.
28- use test:: B2 ; //~ ERROR unused import
28+ use test:: B2 ; //~ ERROR unused import: `test::B2`
2929
3030// Make sure this import is warned about when at least one of its imported names
3131// is unused
32- use test2:: { foo, bar} ; //~ ERROR unused import
32+ use test2:: { foo, bar} ; //~ ERROR unused import: `bar`
3333
3434mod test2 {
3535 pub fn foo ( ) { }
@@ -57,7 +57,7 @@ mod bar {
5757
5858 pub mod c {
5959 use foo:: Point ;
60- use foo:: Square ; //~ ERROR unused import
60+ use foo:: Square ; //~ ERROR unused import: `foo::Square`
6161 pub fn cc ( _p : Point ) -> super :: Square {
6262 fn f ( ) -> super :: Square {
6363 super :: Square
@@ -73,7 +73,7 @@ mod bar {
7373}
7474
7575fn g ( ) {
76- use self :: g; //~ ERROR unused import
76+ use self :: g; //~ ERROR unused import: `self::g`
7777 fn f ( ) {
7878 self :: g ( ) ;
7979 }
@@ -82,7 +82,7 @@ fn g() {
8282// c.f. issue #35135
8383#[ allow( unused_variables) ]
8484fn h ( ) {
85- use test2:: foo; //~ ERROR unused import
85+ use test2:: foo; //~ ERROR unused import: `test2::foo`
8686 let foo = 0 ;
8787}
8888
0 commit comments