diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-07-25 17:49:15 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-08-05 16:37:01 +0200 |
commit | 839e42810abb365b1fdb5690620c9a5be86f1b65 (patch) | |
tree | e62221561655382c74b4f6dfa290c0cc1d1e915a /gcc/rust/hir/tree/rust-hir-pattern.h | |
parent | eca63cc3b4d6280892dbdedae942ed49ffcc0b8c (diff) | |
download | gcc-839e42810abb365b1fdb5690620c9a5be86f1b65.zip gcc-839e42810abb365b1fdb5690620c9a5be86f1b65.tar.gz gcc-839e42810abb365b1fdb5690620c9a5be86f1b65.tar.bz2 |
gccrs: Refactor the ParamType to a BaseGeneric base-type
In order to support const generics we need to abstract away some of the specific
ParamType to a BaseGeneric type so we can easily reuse our existing substitution
bits for const generics which will mean creating a TyTy::ConstType to wrap up
the gcc tree but also represent a const inference and the const decl.
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc (sizeof_handler): refactor types
(op_with_overflow_inner): likewise
(uninit_handler): likewise
(move_val_init_handler): likewise
* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): likewise
* typecheck/rust-hir-trait-resolve.cc: likewise
* typecheck/rust-hir-type-check-base.cc: likewise
* typecheck/rust-hir-type-check-item.cc: likewise
* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::is_equal): likewise
* typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_param_ty): likewise
(SubstitutionArg::get_param_mapping): likewise
(SubstitutionRef::prepare_higher_ranked_bounds): likewise
(SubstitutionRef::monomorphize): likewise
* typecheck/rust-tyty-subst.h (class BaseGeneric): new generic base
* typecheck/rust-tyty.cc (VariantDef::clone): likewise
(VariantDef::monomorphized_clone): refactor
(ADTType::is_equal): likewise
(FnType::is_equal): likewise
(ParamType::ParamType): likewise
* typecheck/rust-tyty.h (class ParamType): likewise
(class BaseGeneric): new base class impl
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-pattern.h')
0 files changed, 0 insertions, 0 deletions