From 3df5ed955d338231ec896462b658283c46d31c60 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Fri, 3 Mar 2023 16:12:46 +0000 Subject: gccrs: destructure parameter names. When we have complex generic code you can end up with situations where we compile types: Maybe<::A> Into Maybe<>> This calls destructure to cleanup the naming here and avoid making non canonical TREE_TYPES hitting the verify_gimple code triggering non-trival constructors. Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (ParamType::get_name): call destructure --- gcc/rust/typecheck/rust-tyty.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc index 219068e..217e82a 100644 --- a/gcc/rust/typecheck/rust-tyty.cc +++ b/gcc/rust/typecheck/rust-tyty.cc @@ -18,10 +18,7 @@ #include "rust-tyty.h" -#include "rust-hir-type-check-expr.h" -#include "rust-hir-type-check-type.h" #include "rust-tyty-visitor.h" -#include "rust-tyty-call.h" #include "rust-hir-map.h" #include "rust-location.h" #include "rust-linemap.h" @@ -2961,7 +2958,7 @@ ParamType::get_name () const if (!can_resolve ()) return get_symbol (); - return resolve ()->get_name (); + return destructure ()->get_name (); } bool -- cgit v1.1