public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Make the can equal interface more permissive with associated types
@ 2022-06-08 12:27 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0e7eef6556703cd53b336d0b5280c3696586d431
commit 0e7eef6556703cd53b336d0b5280c3696586d431
Author: Philip Herron <philip.herron@embecosm.com>
Date: Wed Mar 30 14:56:34 2022 +0100
Make the can equal interface more permissive with associated types
Diff:
---
gcc/rust/typecheck/rust-tyty-cmp.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/typecheck/rust-tyty-cmp.h b/gcc/rust/typecheck/rust-tyty-cmp.h
index 34c89639f6f..9ea49cae820 100644
--- a/gcc/rust/typecheck/rust-tyty-cmp.h
+++ b/gcc/rust/typecheck/rust-tyty-cmp.h
@@ -43,16 +43,19 @@ public:
return ok;
}
}
- else if (other->get_kind () == TypeKind::PLACEHOLDER)
+ if (other->get_kind () == TypeKind::PLACEHOLDER)
{
const PlaceholderType *p = static_cast<const PlaceholderType *> (other);
if (p->can_resolve ())
{
- const BaseType *resolved = p->resolve ();
- resolved->accept_vis (*this);
- return ok;
+ other = p->resolve ();
}
}
+ if (other->get_kind () == TypeKind::PROJECTION)
+ {
+ const ProjectionType *p = static_cast<const ProjectionType *> (other);
+ other = p->get ();
+ }
other->accept_vis (*this);
return ok;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:27 [gcc/devel/rust/master] Make the can equal interface more permissive with associated types 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).