about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFabian Drinck <fabian.drinck@rwth-aachen.de>2019-03-16 18:08:51 +0100
committerFabian Drinck <fabian.drinck@rwth-aachen.de>2019-03-30 22:37:02 +0100
commitd04e83fe2c51acd2c8e89c03d15deb7e1896bb8b (patch)
tree631b003b743651972e6492418beb3c10ea354faa /src
parent2245d10fac9b37c55a286f48d8560fc9537cbc3e (diff)
downloadrust-d04e83fe2c51acd2c8e89c03d15deb7e1896bb8b.tar.gz
rust-d04e83fe2c51acd2c8e89c03d15deb7e1896bb8b.zip
Bless tests
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/lint/lint-unused-imports.stderr23
-rw-r--r--src/test/ui/rust-2018/future-proofing-locals.stderr46
2 files changed, 69 insertions, 0 deletions
diff --git a/src/test/ui/lint/lint-unused-imports.stderr b/src/test/ui/lint/lint-unused-imports.stderr
index f9a54f477f9..bf194696f61 100644
--- a/src/test/ui/lint/lint-unused-imports.stderr
+++ b/src/test/ui/lint/lint-unused-imports.stderr
@@ -34,12 +34,35 @@ error: unused import: `foo::Square`
 LL |         use foo::Square;
    |             ^^^^^^^^^^^
 
+warning: the item `g` is imported redundantly
+  --> $DIR/lint-unused-imports.rs:68:9
+   |
+LL | / fn g() {
+LL | |     use self::g;
+   | |         ^^^^^^^
+LL | |     fn f() {
+LL | |         self::g();
+LL | |     }
+LL | | }
+   | |_- the item `g` was already imported here
+   |
+   = note: #[warn(redundant_import)] on by default
+
 error: unused import: `self::g`
   --> $DIR/lint-unused-imports.rs:68:9
    |
 LL |     use self::g;
    |         ^^^^^^^
 
+warning: the item `foo` is imported redundantly
+  --> $DIR/lint-unused-imports.rs:77:9
+   |
+LL | use test2::{foo, bar};
+   |             --- the item `foo` was already imported here
+...
+LL |     use test2::foo;
+   |         ^^^^^^^^^^
+
 error: unused import: `test2::foo`
   --> $DIR/lint-unused-imports.rs:77:9
    |
diff --git a/src/test/ui/rust-2018/future-proofing-locals.stderr b/src/test/ui/rust-2018/future-proofing-locals.stderr
index 4d666d22afe..fa8333b5d21 100644
--- a/src/test/ui/rust-2018/future-proofing-locals.stderr
+++ b/src/test/ui/rust-2018/future-proofing-locals.stderr
@@ -52,5 +52,51 @@ error: imports cannot refer to local variables
 LL |     use {T as _, x};
    |                  ^
 
+warning: the item `T` is imported redundantly
+  --> $DIR/future-proofing-locals.rs:19:9
+   |
+LL | / mod T {
+LL | |     pub struct U;
+LL | | }
+   | |_- the item `T` was already imported here
+...
+LL |       use T;
+   |           ^
+   |
+   = note: #[warn(redundant_import)] on by default
+
+warning: the item `x` is imported redundantly
+  --> $DIR/future-proofing-locals.rs:31:9
+   |
+LL | / mod x {
+LL | |     pub struct y;
+LL | | }
+   | |_- the item `x` was already imported here
+...
+LL |       use x;
+   |           ^
+
+warning: the item `x` is imported redundantly
+  --> $DIR/future-proofing-locals.rs:37:17
+   |
+LL | / mod x {
+LL | |     pub struct y;
+LL | | }
+   | |_- the item `x` was already imported here
+...
+LL |               use x;
+   |                   ^
+
+warning: the item `x` is imported redundantly
+  --> $DIR/future-proofing-locals.rs:45:18
+   |
+LL | / mod x {
+LL | |     pub struct y;
+LL | | }
+   | |_- the item `x` was already imported here
+...
+LL |       use {T as _, x};
+   |                    ^
+
 error: aborting due to 9 previous errors