diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index ef3c3da89c572..325e835fbd879 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1916,8 +1916,9 @@ impl<'a> Resolver<'a> { } PathResult::Module(ModuleOrUniformRoot::ExternPrelude) | PathResult::NonModule(..) - | PathResult::Failed { .. } => None, - PathResult::Module(..) | PathResult::Indeterminate => unreachable!(), + | PathResult::Failed { .. } + | PathResult::Indeterminate => None, + PathResult::Module(..) => unreachable!(), } } diff --git a/src/test/rustdoc/issue-100241.rs b/src/test/rustdoc/issue-100241.rs new file mode 100644 index 0000000000000..b15522e4bff7a --- /dev/null +++ b/src/test/rustdoc/issue-100241.rs @@ -0,0 +1,13 @@ +//! See [`S`]. + +// Check that this isn't an ICE +// should-fail + +mod foo { + pub use inner::S; + //~^ ERROR unresolved imports `inner`, `foo::S` +} + +pub use foo::*; + +use foo::S;