public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Make override context permissive when the TypeParam cannot resolve
@ 2022-06-08 11:33 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:33 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e68a772a4a3010b62dae7231b1d841654dbb66d3

commit e68a772a4a3010b62dae7231b1d841654dbb66d3
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Fri Sep 10 13:25:12 2021 +0100

    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.

Diff:
---
 gcc/rust/typecheck/rust-tyty.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index 316caeac696..899ad59384f 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 ();


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:33 [gcc/devel/rust/master] Make override context permissive when the TypeParam cannot resolve Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).