From 7faaf8f4aa60b954a7370ae04ba90a021fa80fef Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Tue, 5 Apr 2022 15:38:18 +0300 Subject: resolve: Fix resolution of empty paths passed from rustdoc --- compiler/rustc_resolve/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_resolve/src') diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 3e677277826..0c7d2f7b4e5 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -3298,7 +3298,9 @@ impl<'a> Resolver<'a> { PathResult::NonModule(path_res) if path_res.unresolved_segments() == 0 => { Some(path_res.base_res()) } - PathResult::NonModule(..) | PathResult::Failed { .. } => None, + PathResult::Module(ModuleOrUniformRoot::ExternPrelude) + | PathResult::NonModule(..) + | PathResult::Failed { .. } => None, PathResult::Module(..) | PathResult::Indeterminate => unreachable!(), } } -- cgit 1.4.1-3-g733a5