diff options
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-bounds.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/typecheck/rust-tyty-bounds.cc b/gcc/rust/typecheck/rust-tyty-bounds.cc index 6f946bd..defa0ec 100644 --- a/gcc/rust/typecheck/rust-tyty-bounds.cc +++ b/gcc/rust/typecheck/rust-tyty-bounds.cc @@ -360,6 +360,9 @@ TypeBoundPredicate::operator= (const TypeBoundPredicate &other) for (const auto &p : other.get_substs ()) substitutions.push_back (p.clone ()); + if (other.is_error ()) + return *this; + std::vector<SubstitutionArg> mappings; for (size_t i = 0; i < other.used_arguments.get_mappings ().size (); i++) { |