aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 1651ea6..660931f 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -3543,7 +3543,17 @@ bool
PlaceholderType::can_resolve () const
{
auto context = Resolver::TypeCheckContext::get ();
- return context->lookup_associated_type_mapping (get_ty_ref (), nullptr);
+
+ BaseType *lookup = nullptr;
+ HirId mapping;
+
+ if (!context->lookup_associated_type_mapping (get_ty_ref (), &mapping))
+ return false;
+
+ if (!context->lookup_type (mapping, &lookup))
+ return false;
+
+ return lookup != nullptr;
}
BaseType *