aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-09-10 13:25:12 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-09-10 13:38:18 +0100
commite68a772a4a3010b62dae7231b1d841654dbb66d3 (patch)
treefbe737f7eef9b8fb14bdbe6db076ef5214e439dc /gcc
parent454b78dd044854440f358a3a64fae929937e1527 (diff)
downloadgcc-e68a772a4a3010b62dae7231b1d841654dbb66d3.zip
gcc-e68a772a4a3010b62dae7231b1d841654dbb66d3.tar.gz
gcc-e68a772a4a3010b62dae7231b1d841654dbb66d3.tar.bz2
Make override context permissive when the TypeParam cannot resolve
When we have generic code that calls other generic code the type system will have already setup the side tables for substituions and at this point the referenced generic code does not need to be substituted again.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 316caea..899ad59 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -310,7 +310,8 @@ StructFieldType::clone () const
void
SubstitutionParamMapping::override_context ()
{
- rust_assert (param->can_resolve ());
+ if (!param->can_resolve ())
+ return;
auto mappings = Analysis::Mappings::get ();
auto context = Resolver::TypeCheckContext::get ();