about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-04-05 15:38:18 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-04-05 16:55:53 +0300
commit7faaf8f4aa60b954a7370ae04ba90a021fa80fef (patch)
tree8f4f030c99bb0cc78eeb4a95481286ea92d8f45f /compiler/rustc_resolve/src
parent634770c0a7f8598164ab825cfe419cc8b03c36e5 (diff)
downloadrust-7faaf8f4aa60b954a7370ae04ba90a021fa80fef.tar.gz
rust-7faaf8f4aa60b954a7370ae04ba90a021fa80fef.zip
resolve: Fix resolution of empty paths passed from rustdoc
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
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!(),
         }
     }