@@ -17,19 +17,19 @@ use std::mem::*; // shouldn't get errors for not using
17
17
// everything imported
18
18
19
19
// 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`
22
22
23
- use test:: A ; //~ ERROR unused import
23
+ use test:: A ; //~ ERROR unused import: `test::A`
24
24
// Be sure that if we just bring some methods into scope that they're also
25
25
// counted as being used.
26
26
use test:: B ;
27
27
// 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`
29
29
30
30
// Make sure this import is warned about when at least one of its imported names
31
31
// is unused
32
- use test2:: { foo, bar} ; //~ ERROR unused import
32
+ use test2:: { foo, bar} ; //~ ERROR unused import: `bar`
33
33
34
34
mod test2 {
35
35
pub fn foo ( ) { }
@@ -57,7 +57,7 @@ mod bar {
57
57
58
58
pub mod c {
59
59
use foo:: Point ;
60
- use foo:: Square ; //~ ERROR unused import
60
+ use foo:: Square ; //~ ERROR unused import: `foo::Square`
61
61
pub fn cc ( _p : Point ) -> super :: Square {
62
62
fn f ( ) -> super :: Square {
63
63
super :: Square
@@ -73,7 +73,7 @@ mod bar {
73
73
}
74
74
75
75
fn g ( ) {
76
- use self :: g; //~ ERROR unused import
76
+ use self :: g; //~ ERROR unused import: `self::g`
77
77
fn f ( ) {
78
78
self :: g ( ) ;
79
79
}
@@ -82,7 +82,7 @@ fn g() {
82
82
// c.f. issue #35135
83
83
#[ allow( unused_variables) ]
84
84
fn h ( ) {
85
- use test2:: foo; //~ ERROR unused import
85
+ use test2:: foo; //~ ERROR unused import: `test2::foo`
86
86
let foo = 0 ;
87
87
}
88
88
0 commit comments