about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-05 03:03:45 +0000
committerbors <bors@rust-lang.org>2016-02-05 03:03:45 +0000
commitdcf8ef2723d106c3467a2ee17746aa5768c3cdc6 (patch)
treec68fed0383cb57e0da5f0e3ed1683bddb71a94c3 /src/test
parent7bcced73b77ba56834c3b5da0c4f82f80aa74db8 (diff)
parent9c166cb6713e1cbeed1db6efc4f7eb1dfa150294 (diff)
downloadrust-dcf8ef2723d106c3467a2ee17746aa5768c3cdc6.tar.gz
rust-dcf8ef2723d106c3467a2ee17746aa5768c3cdc6.zip
Auto merge of #31321 - jseyfried:cleanup, r=nrc
The first commit improves detection of unused imports -- it should have been part of #30325. Right now, the unused import in the changed test would not be reported.

The rest of the commits are miscellaneous, independent clean-ups in resolve that I didn't think warranted individual PRs.

r? @nrc
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/lint-unused-imports.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs
index 35883293990..080c5e400ac 100644
--- a/src/test/compile-fail/lint-unused-imports.rs
+++ b/src/test/compile-fail/lint-unused-imports.rs
@@ -56,7 +56,10 @@ mod bar {
         use foo::Point;
         use foo::Square; //~ ERROR unused import
         pub fn cc(_p: Point) -> super::Square {
-            super::Square
+            fn f() -> super::Square {
+                super::Square
+            }
+            f()
         }
     }