about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-03-22 02:20:32 +0100
committerGitHub <noreply@github.com>2021-03-22 02:20:32 +0100
commitea5ba76d1cdbc1f3cbe5f5d8582349fcf7373ed6 (patch)
tree28837cced28fa7e788e5e19d0b10e9e1f60b5585 /compiler
parent85f16fb4bc5310da11423286a3570831ca1eef9a (diff)
parentbfae41d7b01f016fab65ed4be9ecdb5c31a97f09 (diff)
downloadrust-ea5ba76d1cdbc1f3cbe5f5d8582349fcf7373ed6.tar.gz
rust-ea5ba76d1cdbc1f3cbe5f5d8582349fcf7373ed6.zip
Rollup merge of #83336 - camelid:tool-mod-ice, r=petrochenkov
Fix ICE with `use clippy::a::b;`

Fixes #83317.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_resolve/src/imports.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs
index 61f4c00a4ca..26858915f45 100644
--- a/compiler/rustc_resolve/src/imports.rs
+++ b/compiler/rustc_resolve/src/imports.rs
@@ -955,14 +955,14 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
                 }
                 return None;
             }
-            PathResult::NonModule(path_res) if path_res.base_res() == Res::Err => {
+            PathResult::NonModule(_) => {
                 if no_ambiguity {
                     assert!(import.imported_module.get().is_none());
                 }
                 // The error was already reported earlier.
                 return None;
             }
-            PathResult::Indeterminate | PathResult::NonModule(..) => unreachable!(),
+            PathResult::Indeterminate => unreachable!(),
         };
 
         let (ident, target, source_bindings, target_bindings, type_ns_only) = match import.kind {