diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-03-22 02:20:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 02:20:32 +0100 |
| commit | ea5ba76d1cdbc1f3cbe5f5d8582349fcf7373ed6 (patch) | |
| tree | 28837cced28fa7e788e5e19d0b10e9e1f60b5585 /compiler | |
| parent | 85f16fb4bc5310da11423286a3570831ca1eef9a (diff) | |
| parent | bfae41d7b01f016fab65ed4be9ecdb5c31a97f09 (diff) | |
| download | rust-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.rs | 4 |
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 { |
