summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/resolve')
-rw-r--r--tests/ui/resolve/crate-in-paths.stderr2
-rw-r--r--tests/ui/resolve/disambiguate-identical-names.rs15
-rw-r--r--tests/ui/resolve/disambiguate-identical-names.stderr19
-rw-r--r--tests/ui/resolve/enums-are-namespaced-xc.stderr6
-rw-r--r--tests/ui/resolve/filter-intrinsics.stderr4
-rw-r--r--tests/ui/resolve/issue-102946.stderr2
-rw-r--r--tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs33
-rw-r--r--tests/ui/resolve/issue-107563-ambiguous-glob-reexports.stderr47
-rw-r--r--tests/ui/resolve/issue-16058.stderr6
-rw-r--r--tests/ui/resolve/issue-17518.stderr2
-rw-r--r--tests/ui/resolve/issue-21221-1.stderr14
-rw-r--r--tests/ui/resolve/issue-21221-2.stderr4
-rw-r--r--tests/ui/resolve/issue-21221-3.stderr2
-rw-r--r--tests/ui/resolve/issue-21221-4.stderr2
-rw-r--r--tests/ui/resolve/issue-2356.stderr2
-rw-r--r--tests/ui/resolve/issue-26545.stderr2
-rw-r--r--tests/ui/resolve/issue-35675.stderr4
-rw-r--r--tests/ui/resolve/issue-3907.stderr2
-rw-r--r--tests/ui/resolve/issue-50599.stderr4
-rw-r--r--tests/ui/resolve/issue-73427.stderr4
-rw-r--r--tests/ui/resolve/issue-90113.stderr2
-rw-r--r--tests/ui/resolve/missing-in-namespace.stderr2
-rw-r--r--tests/ui/resolve/no-implicit-prelude-nested.stderr30
-rw-r--r--tests/ui/resolve/no-implicit-prelude.stderr10
-rw-r--r--tests/ui/resolve/privacy-enum-ctor.stderr8
-rw-r--r--tests/ui/resolve/resolve-primitive-fallback.stderr2
-rw-r--r--tests/ui/resolve/tool-import.rs8
-rw-r--r--tests/ui/resolve/tool-import.stderr9
-rw-r--r--tests/ui/resolve/use_suggestion.stderr4
-rw-r--r--tests/ui/resolve/use_suggestion_placement.stderr6
30 files changed, 194 insertions, 63 deletions
diff --git a/tests/ui/resolve/crate-in-paths.stderr b/tests/ui/resolve/crate-in-paths.stderr
index b7cf49507..07fb5dcc0 100644
--- a/tests/ui/resolve/crate-in-paths.stderr
+++ b/tests/ui/resolve/crate-in-paths.stderr
@@ -6,7 +6,7 @@ LL | Foo;
|
help: consider importing this unit struct
|
-LL | use crate::bar::Foo;
+LL + use crate::bar::Foo;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/disambiguate-identical-names.rs b/tests/ui/resolve/disambiguate-identical-names.rs
new file mode 100644
index 000000000..708d2cd76
--- /dev/null
+++ b/tests/ui/resolve/disambiguate-identical-names.rs
@@ -0,0 +1,15 @@
+pub mod submod {
+ // Create ambiguity with the std::vec::Vec item:
+ pub struct Vec;
+}
+
+fn test(_v: &Vec<Vec<u32>>) {
+}
+
+fn main() {
+ let v = std::collections::HashMap::new();
+ v.insert(3u8, 1u8);
+
+ test(&v);
+ //~^ ERROR mismatched types
+}
diff --git a/tests/ui/resolve/disambiguate-identical-names.stderr b/tests/ui/resolve/disambiguate-identical-names.stderr
new file mode 100644
index 000000000..7d8293018
--- /dev/null
+++ b/tests/ui/resolve/disambiguate-identical-names.stderr
@@ -0,0 +1,19 @@
+error[E0308]: mismatched types
+ --> $DIR/disambiguate-identical-names.rs:13:10
+ |
+LL | test(&v);
+ | ---- ^^ expected `&Vec<Vec<u32>>`, found `&HashMap<u8, u8>`
+ | |
+ | arguments to this function are incorrect
+ |
+ = note: expected reference `&std::vec::Vec<std::vec::Vec<u32>>`
+ found reference `&HashMap<u8, u8>`
+note: function defined here
+ --> $DIR/disambiguate-identical-names.rs:6:4
+ |
+LL | fn test(_v: &Vec<Vec<u32>>) {
+ | ^^^^ ------------------
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/resolve/enums-are-namespaced-xc.stderr b/tests/ui/resolve/enums-are-namespaced-xc.stderr
index 6448e596d..5af6cb042 100644
--- a/tests/ui/resolve/enums-are-namespaced-xc.stderr
+++ b/tests/ui/resolve/enums-are-namespaced-xc.stderr
@@ -6,7 +6,7 @@ LL | let _ = namespaced_enums::A;
|
help: consider importing this unit variant
|
-LL | use namespaced_enums::Foo::A;
+LL + use namespaced_enums::Foo::A;
|
help: if you import `A`, refer to it directly
|
@@ -22,7 +22,7 @@ LL | let _ = namespaced_enums::B(10);
|
help: consider importing this tuple variant
|
-LL | use namespaced_enums::Foo::B;
+LL + use namespaced_enums::Foo::B;
|
help: if you import `B`, refer to it directly
|
@@ -38,7 +38,7 @@ LL | let _ = namespaced_enums::C { a: 10 };
|
help: consider importing this variant
|
-LL | use namespaced_enums::Foo::C;
+LL + use namespaced_enums::Foo::C;
|
help: if you import `C`, refer to it directly
|
diff --git a/tests/ui/resolve/filter-intrinsics.stderr b/tests/ui/resolve/filter-intrinsics.stderr
index 955070891..cc1092dd0 100644
--- a/tests/ui/resolve/filter-intrinsics.stderr
+++ b/tests/ui/resolve/filter-intrinsics.stderr
@@ -6,7 +6,7 @@ LL | let _ = size_of::<usize>();
|
help: consider importing this function
|
-LL | use std::mem::size_of;
+LL + use std::mem::size_of;
|
error[E0425]: cannot find function `fabsf64` in this scope
@@ -17,7 +17,7 @@ LL | let _ = fabsf64(1.0);
|
help: consider importing this function
|
-LL | use std::intrinsics::fabsf64;
+LL + use std::intrinsics::fabsf64;
|
error: aborting due to 2 previous errors
diff --git a/tests/ui/resolve/issue-102946.stderr b/tests/ui/resolve/issue-102946.stderr
index 65be0258e..b2cdcb25c 100644
--- a/tests/ui/resolve/issue-102946.stderr
+++ b/tests/ui/resolve/issue-102946.stderr
@@ -6,7 +6,7 @@ LL | impl Error for str::Utf8Error {
|
help: consider importing this trait
|
-LL | use std::error::Error;
+LL + use std::error::Error;
|
error[E0223]: ambiguous associated type
diff --git a/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs b/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs
new file mode 100644
index 000000000..431213e25
--- /dev/null
+++ b/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs
@@ -0,0 +1,33 @@
+#![deny(ambiguous_glob_reexports)]
+
+pub mod foo {
+ pub type X = u8;
+}
+
+pub mod bar {
+ pub type X = u8;
+ pub type Y = u8;
+}
+
+pub use foo::*;
+//~^ ERROR ambiguous glob re-exports
+pub use bar::*;
+
+mod ambiguous {
+ mod m1 { pub type A = u8; }
+ mod m2 { pub type A = u8; }
+ pub use self::m1::*;
+ //~^ ERROR ambiguous glob re-exports
+ pub use self::m2::*;
+}
+
+pub mod single {
+ pub use ambiguous::A;
+ //~^ ERROR `A` is ambiguous
+}
+
+pub mod glob {
+ pub use ambiguous::*;
+}
+
+pub fn main() {}
diff --git a/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.stderr b/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.stderr
new file mode 100644
index 000000000..07e61dd86
--- /dev/null
+++ b/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.stderr
@@ -0,0 +1,47 @@
+error[E0659]: `A` is ambiguous
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:25:24
+ |
+LL | pub use ambiguous::A;
+ | ^ ambiguous name
+ |
+ = note: ambiguous because of multiple glob imports of a name in the same module
+note: `A` could refer to the type alias imported here
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:19:13
+ |
+LL | pub use self::m1::*;
+ | ^^^^^^^^^^^
+ = help: consider adding an explicit import of `A` to disambiguate
+note: `A` could also refer to the type alias imported here
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:21:13
+ |
+LL | pub use self::m2::*;
+ | ^^^^^^^^^^^
+ = help: consider adding an explicit import of `A` to disambiguate
+
+error: ambiguous glob re-exports
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:12:9
+ |
+LL | pub use foo::*;
+ | ^^^^^^ the name `X` in the type namespace is first re-exported here
+LL |
+LL | pub use bar::*;
+ | ------ but the name `X` in the type namespace is also re-exported here
+ |
+note: the lint level is defined here
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:1:9
+ |
+LL | #![deny(ambiguous_glob_reexports)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: ambiguous glob re-exports
+ --> $DIR/issue-107563-ambiguous-glob-reexports.rs:19:13
+ |
+LL | pub use self::m1::*;
+ | ^^^^^^^^^^^ the name `A` in the type namespace is first re-exported here
+LL |
+LL | pub use self::m2::*;
+ | ----------- but the name `A` in the type namespace is also re-exported here
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0659`.
diff --git a/tests/ui/resolve/issue-16058.stderr b/tests/ui/resolve/issue-16058.stderr
index c47d22cef..710002a15 100644
--- a/tests/ui/resolve/issue-16058.stderr
+++ b/tests/ui/resolve/issue-16058.stderr
@@ -6,11 +6,11 @@ LL | Result {
|
help: consider importing one of these items instead
|
-LL | use std::fmt::Result;
+LL + use std::fmt::Result;
|
-LL | use std::io::Result;
+LL + use std::io::Result;
|
-LL | use std::thread::Result;
+LL + use std::thread::Result;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-17518.stderr b/tests/ui/resolve/issue-17518.stderr
index 034d0d01b..492e3b34a 100644
--- a/tests/ui/resolve/issue-17518.stderr
+++ b/tests/ui/resolve/issue-17518.stderr
@@ -6,7 +6,7 @@ LL | E { name: "foobar" };
|
help: consider importing this variant
|
-LL | use SomeEnum::E;
+LL + use SomeEnum::E;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-21221-1.stderr b/tests/ui/resolve/issue-21221-1.stderr
index 538eeead9..a38116cd7 100644
--- a/tests/ui/resolve/issue-21221-1.stderr
+++ b/tests/ui/resolve/issue-21221-1.stderr
@@ -6,11 +6,11 @@ LL | impl Mul for Foo {
|
help: consider importing one of these items
|
-LL | use mul1::Mul;
+LL + use mul1::Mul;
|
-LL | use mul2::Mul;
+LL + use mul2::Mul;
|
-LL | use std::ops::Mul;
+LL + use std::ops::Mul;
|
error[E0412]: cannot find type `Mul` in this scope
@@ -21,11 +21,11 @@ LL | fn getMul() -> Mul {
|
help: consider importing one of these items
|
-LL | use mul1::Mul;
+LL + use mul1::Mul;
|
-LL | use mul2::Mul;
+LL + use mul2::Mul;
|
-LL | use std::ops::Mul;
+LL + use std::ops::Mul;
|
error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope
@@ -42,7 +42,7 @@ LL | impl Div for Foo {
|
help: consider importing this trait
|
-LL | use std::ops::Div;
+LL + use std::ops::Div;
|
error: aborting due to 4 previous errors
diff --git a/tests/ui/resolve/issue-21221-2.stderr b/tests/ui/resolve/issue-21221-2.stderr
index d4fd7cb12..9beb62662 100644
--- a/tests/ui/resolve/issue-21221-2.stderr
+++ b/tests/ui/resolve/issue-21221-2.stderr
@@ -6,9 +6,9 @@ LL | impl T for Foo { }
|
help: consider importing one of these items
|
-LL | use baz::T;
+LL + use baz::T;
|
-LL | use foo::bar::T;
+LL + use foo::bar::T;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-21221-3.stderr b/tests/ui/resolve/issue-21221-3.stderr
index f12e5b09b..0dabdfd9b 100644
--- a/tests/ui/resolve/issue-21221-3.stderr
+++ b/tests/ui/resolve/issue-21221-3.stderr
@@ -6,7 +6,7 @@ LL | impl OuterTrait for Foo {}
|
help: consider importing this trait
|
-LL | use issue_21221_3::outer::OuterTrait;
+LL + use issue_21221_3::outer::OuterTrait;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-21221-4.stderr b/tests/ui/resolve/issue-21221-4.stderr
index fc15444d0..5af14b1b6 100644
--- a/tests/ui/resolve/issue-21221-4.stderr
+++ b/tests/ui/resolve/issue-21221-4.stderr
@@ -6,7 +6,7 @@ LL | impl T for Foo {}
|
help: consider importing this trait
|
-LL | use issue_21221_4::T;
+LL + use issue_21221_4::T;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-2356.stderr b/tests/ui/resolve/issue-2356.stderr
index 36f3da7c9..313b3e30d 100644
--- a/tests/ui/resolve/issue-2356.stderr
+++ b/tests/ui/resolve/issue-2356.stderr
@@ -10,7 +10,7 @@ LL | Self::default();
| ~~~~~~~~~~~~~
help: consider importing this function
|
-LL | use std::default::default;
+LL + use std::default::default;
|
error[E0425]: cannot find value `whiskers` in this scope
diff --git a/tests/ui/resolve/issue-26545.stderr b/tests/ui/resolve/issue-26545.stderr
index d3c866925..42a7531c5 100644
--- a/tests/ui/resolve/issue-26545.stderr
+++ b/tests/ui/resolve/issue-26545.stderr
@@ -6,7 +6,7 @@ LL | B(());
|
help: consider importing this tuple struct
|
-LL | use foo::B;
+LL + use foo::B;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-35675.stderr b/tests/ui/resolve/issue-35675.stderr
index 4a06196d5..44af65b07 100644
--- a/tests/ui/resolve/issue-35675.stderr
+++ b/tests/ui/resolve/issue-35675.stderr
@@ -17,7 +17,7 @@ LL | Apple(5)
|
help: consider importing this tuple variant
|
-LL | use Fruit::Apple;
+LL + use Fruit::Apple;
|
error[E0573]: expected type, found variant `Fruit::Apple`
@@ -37,7 +37,7 @@ LL | Apple(5)
|
help: consider importing this tuple variant
|
-LL | use Fruit::Apple;
+LL + use Fruit::Apple;
|
error[E0573]: expected type, found variant `Ok`
diff --git a/tests/ui/resolve/issue-3907.stderr b/tests/ui/resolve/issue-3907.stderr
index 6fc61cae8..70631a13c 100644
--- a/tests/ui/resolve/issue-3907.stderr
+++ b/tests/ui/resolve/issue-3907.stderr
@@ -10,7 +10,7 @@ LL | trait Foo = dyn issue_3907::Foo;
|
help: consider importing this trait instead
|
-LL | use issue_3907::Foo;
+LL + use issue_3907::Foo;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/issue-50599.stderr b/tests/ui/resolve/issue-50599.stderr
index b07482c83..d7419b64f 100644
--- a/tests/ui/resolve/issue-50599.stderr
+++ b/tests/ui/resolve/issue-50599.stderr
@@ -6,9 +6,9 @@ LL | const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize;
|
help: consider importing one of these items
|
-LL | use std::f32::consts::LOG10_2;
+LL + use std::f32::consts::LOG10_2;
|
-LL | use std::f64::consts::LOG10_2;
+LL + use std::f64::consts::LOG10_2;
|
help: if you import `LOG10_2`, refer to it directly
|
diff --git a/tests/ui/resolve/issue-73427.stderr b/tests/ui/resolve/issue-73427.stderr
index 4af5f29d8..622de9b39 100644
--- a/tests/ui/resolve/issue-73427.stderr
+++ b/tests/ui/resolve/issue-73427.stderr
@@ -107,9 +107,9 @@ LL | (E::TupleWithFields(/* fields */)).foo();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing one of these items instead
|
-LL | use std::f32::consts::E;
+LL + use std::f32::consts::E;
|
-LL | use std::f64::consts::E;
+LL + use std::f64::consts::E;
|
error[E0532]: expected tuple struct or tuple variant, found enum `A`
diff --git a/tests/ui/resolve/issue-90113.stderr b/tests/ui/resolve/issue-90113.stderr
index 1b7872057..5f55d9c24 100644
--- a/tests/ui/resolve/issue-90113.stderr
+++ b/tests/ui/resolve/issue-90113.stderr
@@ -6,7 +6,7 @@ LL | Cons(..) => {}
|
help: consider importing this tuple variant
|
-LL | use list::List::Cons;
+LL + use list::List::Cons;
|
error: aborting due to previous error
diff --git a/tests/ui/resolve/missing-in-namespace.stderr b/tests/ui/resolve/missing-in-namespace.stderr
index fc925ba3b..7a7b749ae 100644
--- a/tests/ui/resolve/missing-in-namespace.stderr
+++ b/tests/ui/resolve/missing-in-namespace.stderr
@@ -6,7 +6,7 @@ LL | let _map = std::hahmap::HashMap::new();
|
help: consider importing this struct
|
-LL | use std::collections::HashMap;
+LL + use std::collections::HashMap;
|
help: if you import `HashMap`, refer to it directly
|
diff --git a/tests/ui/resolve/no-implicit-prelude-nested.stderr b/tests/ui/resolve/no-implicit-prelude-nested.stderr
index 198b630c5..49cf72bfe 100644
--- a/tests/ui/resolve/no-implicit-prelude-nested.stderr
+++ b/tests/ui/resolve/no-implicit-prelude-nested.stderr
@@ -6,7 +6,7 @@ LL | impl Add for Test {}
|
help: consider importing this trait
|
-LL | use std::ops::Add;
+LL + use std::ops::Add;
|
error[E0404]: expected trait, found derive macro `Clone`
@@ -17,7 +17,7 @@ LL | impl Clone for Test {}
|
help: consider importing this trait instead
|
-LL | use std::clone::Clone;
+LL + use std::clone::Clone;
|
error[E0405]: cannot find trait `Iterator` in this scope
@@ -28,7 +28,7 @@ LL | impl Iterator for Test {}
|
help: consider importing this trait
|
-LL | use std::iter::Iterator;
+LL + use std::iter::Iterator;
|
error[E0405]: cannot find trait `ToString` in this scope
@@ -39,7 +39,7 @@ LL | impl ToString for Test {}
|
help: consider importing this trait
|
-LL | use std::string::ToString;
+LL + use std::string::ToString;
|
error[E0405]: cannot find trait `Writer` in this scope
@@ -56,7 +56,7 @@ LL | drop(2)
|
help: consider importing this function
|
-LL | use std::mem::drop;
+LL + use std::mem::drop;
|
error[E0405]: cannot find trait `Add` in this scope
@@ -67,7 +67,7 @@ LL | impl Add for Test {}
|
help: consider importing this trait
|
-LL | use std::ops::Add;
+LL + use std::ops::Add;
|
error[E0404]: expected trait, found derive macro `Clone`
@@ -78,7 +78,7 @@ LL | impl Clone for Test {}
|
help: consider importing this trait instead
|
-LL | use std::clone::Clone;
+LL + use std::clone::Clone;
|
error[E0405]: cannot find trait `Iterator` in this scope
@@ -89,7 +89,7 @@ LL | impl Iterator for Test {}
|
help: consider importing this trait
|
-LL | use std::iter::Iterator;
+LL + use std::iter::Iterator;
|
error[E0405]: cannot find trait `ToString` in this scope
@@ -100,7 +100,7 @@ LL | impl ToString for Test {}
|
help: consider importing this trait
|
-LL | use std::string::ToString;
+LL + use std::string::ToString;
|
error[E0405]: cannot find trait `Writer` in this scope
@@ -117,7 +117,7 @@ LL | drop(2)
|
help: consider importing this function
|
-LL | use std::mem::drop;
+LL + use std::mem::drop;
|
error[E0405]: cannot find trait `Add` in this scope
@@ -128,7 +128,7 @@ LL | impl Add for Test {}
|
help: consider importing this trait
|
-LL | use std::ops::Add;
+LL + use std::ops::Add;
|
error[E0404]: expected trait, found derive macro `Clone`
@@ -139,7 +139,7 @@ LL | impl Clone for Test {}
|
help: consider importing this trait instead
|
-LL | use std::clone::Clone;
+LL + use std::clone::Clone;
|
error[E0405]: cannot find trait `Iterator` in this scope
@@ -150,7 +150,7 @@ LL | impl Iterator for Test {}
|
help: consider importing this trait
|
-LL | use std::iter::Iterator;
+LL + use std::iter::Iterator;
|
error[E0405]: cannot find trait `ToString` in this scope
@@ -161,7 +161,7 @@ LL | impl ToString for Test {}
|
help: consider importing this trait
|
-LL | use std::string::ToString;
+LL + use std::string::ToString;
|
error[E0405]: cannot find trait `Writer` in this scope
@@ -178,7 +178,7 @@ LL | drop(2)
|
help: consider importing this function
|
-LL | use std::mem::drop;
+LL + use std::mem::drop;
|
error: aborting due to 18 previous errors
diff --git a/tests/ui/resolve/no-implicit-prelude.stderr b/tests/ui/resolve/no-implicit-prelude.stderr
index 36a9b65b7..5a759743f 100644
--- a/tests/ui/resolve/no-implicit-prelude.stderr
+++ b/tests/ui/resolve/no-implicit-prelude.stderr
@@ -6,7 +6,7 @@ LL | impl Add for Test {}
|
help: consider importing this trait
|
-LL | use std::ops::Add;
+LL + use std::ops::Add;
|
error[E0404]: expected trait, found derive macro `Clone`
@@ -17,7 +17,7 @@ LL | impl Clone for Test {}
|
help: consider importing this trait instead
|
-LL | use std::clone::Clone;
+LL + use std::clone::Clone;
|
error[E0405]: cannot find trait `Iterator` in this scope
@@ -28,7 +28,7 @@ LL | impl Iterator for Test {}
|
help: consider importing this trait
|
-LL | use std::iter::Iterator;
+LL + use std::iter::Iterator;
|
error[E0405]: cannot find trait `ToString` in this scope
@@ -39,7 +39,7 @@ LL | impl ToString for Test {}
|
help: consider importing this trait
|
-LL | use std::string::ToString;
+LL + use std::string::ToString;
|
error[E0405]: cannot find trait `Writer` in this scope
@@ -56,7 +56,7 @@ LL | drop(2)
|
help: consider importing this function
|
-LL | use std::mem::drop;
+LL + use std::mem::drop;
|
error: aborting due to 6 previous errors
diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr
index 3c051429f..0bb090905 100644
--- a/tests/ui/resolve/privacy-enum-ctor.stderr
+++ b/tests/ui/resolve/privacy-enum-ctor.stderr
@@ -84,9 +84,9 @@ LL | let _: E = m::f;
| ~
help: consider importing one of these items instead
|
-LL | use std::f32::consts::E;
+LL + use std::f32::consts::E;
|
-LL | use std::f64::consts::E;
+LL + use std::f64::consts::E;
|
help: if you import `E`, refer to it directly
|
@@ -121,9 +121,9 @@ LL | let _: E = (E::Fn(/* fields */));
| ~~~~~~~~~~~~~~~~~~~~~
help: consider importing one of these items instead
|
-LL | use std::f32::consts::E;
+LL + use std::f32::consts::E;
|
-LL | use std::f64::consts::E;
+LL + use std::f64::consts::E;
|
error[E0412]: cannot find type `Z` in this scope
diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr
index f803f9da2..e3a5d4edc 100644
--- a/tests/ui/resolve/resolve-primitive-fallback.stderr
+++ b/tests/ui/resolve/resolve-primitive-fallback.stderr
@@ -12,7 +12,7 @@ LL | let _: ::u8;
|
help: consider importing this builtin type
|
-LL | use std::primitive::u8;
+LL + use std::primitive::u8;
|
help: if you import `u8`, refer to it directly
|
diff --git a/tests/ui/resolve/tool-import.rs b/tests/ui/resolve/tool-import.rs
new file mode 100644
index 000000000..971993332
--- /dev/null
+++ b/tests/ui/resolve/tool-import.rs
@@ -0,0 +1,8 @@
+// edition: 2018
+
+use clippy::time::Instant;
+//~^ `clippy` is a tool module
+
+fn main() {
+ Instant::now();
+}
diff --git a/tests/ui/resolve/tool-import.stderr b/tests/ui/resolve/tool-import.stderr
new file mode 100644
index 000000000..d3bdfc93d
--- /dev/null
+++ b/tests/ui/resolve/tool-import.stderr
@@ -0,0 +1,9 @@
+error[E0433]: failed to resolve: `clippy` is a tool module, not a module
+ --> $DIR/tool-import.rs:3:5
+ |
+LL | use clippy::time::Instant;
+ | ^^^^^^ `clippy` is a tool module, not a module
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/resolve/use_suggestion.stderr b/tests/ui/resolve/use_suggestion.stderr
index 54ad85383..1155f5caa 100644
--- a/tests/ui/resolve/use_suggestion.stderr
+++ b/tests/ui/resolve/use_suggestion.stderr
@@ -6,7 +6,7 @@ LL | let x1 = HashMap::new();
|
help: consider importing this struct
|
-LL | use std::collections::HashMap;
+LL + use std::collections::HashMap;
|
error[E0412]: cannot find type `HashMap` in this scope
@@ -17,7 +17,7 @@ LL | let y1: HashMap;
|
help: consider importing this struct
|
-LL | use std::collections::HashMap;
+LL + use std::collections::HashMap;
|
error[E0412]: cannot find type `GooMap` in this scope
diff --git a/tests/ui/resolve/use_suggestion_placement.stderr b/tests/ui/resolve/use_suggestion_placement.stderr
index 0aadd82f6..3611f9ae6 100644
--- a/tests/ui/resolve/use_suggestion_placement.stderr
+++ b/tests/ui/resolve/use_suggestion_placement.stderr
@@ -6,7 +6,7 @@ LL | type Bar = Path;
|
help: consider importing this struct
|
-LL | use std::path::Path;
+LL + use std::path::Path;
|
error[E0425]: cannot find value `A` in this scope
@@ -17,7 +17,7 @@ LL | let _ = A;
|
help: consider importing this constant
|
-LL | use m::A;
+LL + use m::A;
|
error[E0412]: cannot find type `HashMap` in this scope
@@ -28,7 +28,7 @@ LL | type Dict<K, V> = HashMap<K, V>;
|
help: consider importing this struct
|
-LL | use std::collections::HashMap;
+LL + use std::collections::HashMap;
|
error: aborting due to 3 previous errors