From: Philip Herron <[email protected]>
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-base.cc (walk_types_to_constrain):
track the ref as well
Signed-off-by: Philip Herron <[email protected]>
---
gcc/rust/typecheck/rust-hir-type-check-base.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/typecheck/rust-hir-type-check-base.cc
b/gcc/rust/typecheck/rust-hir-type-check-base.cc
index 8810ef45808..ebe7fad713c 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-base.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-base.cc
@@ -56,7 +56,9 @@ walk_types_to_constrain (std::set<HirId> &constrained_symbols,
if (arg != nullptr)
{
const auto p = arg->get_root ();
+ constrained_symbols.insert (p->get_ref ());
constrained_symbols.insert (p->get_ty_ref ());
+
if (p->has_substitutions_defined ())
{
walk_types_to_constrain (constrained_symbols,
@@ -164,8 +166,6 @@ TypeCheckBase::check_for_unconstrained (
HirId ref = p.get_param_ty ()->get_ref ();
symbols_to_constrain.insert (ref);
symbol_to_location.insert ({ref, p.get_param_locus ()});
-
- rust_debug_loc (p.get_param_locus (), "XX constrain THIS");
}
// set up the set of constrained symbols
--
2.50.1