Update crates/hir-def/src/resolver.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
Hayashi Mikihiro 2025-04-08 18:07:14 +09:00
parent 1b471ebfd5
commit b75a3388f1

View file

@ -247,7 +247,7 @@ impl Resolver {
Scope::BlockScope(m) => {
if let Some(res) = m.resolve_path_in_type_ns(db, path) {
let res = match res.0 {
TypeNs::ModuleId(_) => {
TypeNs::ModuleId(_) if res.1.is_none() => {
if let Some(ModuleDefId::BuiltinType(builtin)) = BUILTIN_SCOPE
.get(first_name)
.and_then(|builtin| builtin.take_types())