diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-03-03 16:12:46 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-03 19:27:24 +0000 |
commit | 22465fbc8cca239aadcb35cd51d820d6d7213238 (patch) | |
tree | 29b41d8c4028c752e2b8d20ff8e9412bab067a31 /gcc/rust | |
parent | 6540653bc29778a5473746bc7463c75204e07c23 (diff) | |
download | gcc-22465fbc8cca239aadcb35cd51d820d6d7213238.zip gcc-22465fbc8cca239aadcb35cd51d820d6d7213238.tar.gz gcc-22465fbc8cca239aadcb35cd51d820d6d7213238.tar.bz2 |
gccrs: destructure parameter names.
When we have complex generic code you can end up with situations where we
compile types:
Maybe<<S as Foo>::A>
Into
Maybe<<placeholder:<Projection=::()>>>
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 <herron.philip@googlemail.com>
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc (ParamType::get_name): call destructure
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc index 110f592..e6dfc56 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 |