diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-04-20 11:55:20 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-04-26 15:02:47 +0000 |
commit | 028a5bb8ed10c202d024a544b9ca3087a0fcd90c (patch) | |
tree | 8b5b1b7887ba81a5b820a6a3c315d5cdae7286cb /gcc | |
parent | ddcd571a67fb205f7e168a3c3cd4e63080ed026b (diff) | |
download | gcc-028a5bb8ed10c202d024a544b9ca3087a0fcd90c.zip gcc-028a5bb8ed10c202d024a544b9ca3087a0fcd90c.tar.gz gcc-028a5bb8ed10c202d024a544b9ca3087a0fcd90c.tar.bz2 |
gccrs: Fix ICE in assignment of error type bound predicates
gcc/rust/ChangeLog:
* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::operator=):
we are done if other is in an error state
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc')
-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++) { |