diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-03-10 18:13:01 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-17 10:34:36 +0000 |
commit | 01c741adc217fe270239ce2543e119f5f96d241d (patch) | |
tree | 33ec6a4c8e896d99ba7fe89ca8f66833c0877324 /gcc/rust/backend/rust-compile.cc | |
parent | bab564903706658ce8fa3704b656eeb1dce53330 (diff) | |
download | gcc-01c741adc217fe270239ce2543e119f5f96d241d.zip gcc-01c741adc217fe270239ce2543e119f5f96d241d.tar.gz gcc-01c741adc217fe270239ce2543e119f5f96d241d.tar.bz2 |
gccrs: tyty get rid of useless virtuals
This removes can_substitute and contains_type_parameters which were
confusing interfaces to act as a proxy to the SubstitionRef types. This
replaces them with a single base implementation which is much easier to
debug and follow.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): update to use new interface
(TypeCheckExpr::resolve_root_path): likewise
(TypeCheckExpr::resolve_segments): likewise
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
(TypeCheckType::resolve_root_path): likewise
* typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): likewise
* typecheck/rust-tyty.cc (BaseType::supports_substitutions): likewise
(BaseType::can_substitute): remove
(BaseType::contains_type_parameters): remove
(handle_substitions): cleanup
(TupleType::handle_substitions): update
(FnType::handle_substitions): update
(ProjectionType::supports_substitutions): update
* typecheck/rust-tyty.h: update header
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile.cc')
0 files changed, 0 insertions, 0 deletions