diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-03-10 18:08:18 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:21:11 +0100 |
commit | 599d5d9f833a2b9dd88e34a77fdb3e43b146a50a (patch) | |
tree | 0ceed63abbb71c78a0136c50cbf39731aabcc719 /gcc | |
parent | 3d9f8ad29181fd4018228de530a03504b53ee0b4 (diff) | |
download | gcc-599d5d9f833a2b9dd88e34a77fdb3e43b146a50a.zip gcc-599d5d9f833a2b9dd88e34a77fdb3e43b146a50a.tar.gz gcc-599d5d9f833a2b9dd88e34a77fdb3e43b146a50a.tar.bz2 |
gccrs: group basetype virtuals together and remove unused virtual
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h: cleanup ordering of header
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h index 53c0d5d..0f261b3 100644 --- a/gcc/rust/typecheck/rust-tyty.h +++ b/gcc/rust/typecheck/rust-tyty.h @@ -131,10 +131,6 @@ public: // return the type-kind TypeKind get_kind () const; - /* Returns a pointer to a clone of this. The caller is responsible for - * releasing the memory of the returned ty. */ - virtual BaseType *clone () const = 0; - // monomorphized clone is a clone which destructures the types to get rid of // generics BaseType *monomorphized_clone () const; @@ -144,13 +140,7 @@ public: void append_reference (HirId id); - virtual bool supports_substitutions () const; - - virtual bool has_subsititions_defined () const; - - virtual bool can_substitute () const; - - virtual bool needs_generic_substitutions () const; + bool can_substitute () const; bool contains_type_parameters () const; @@ -172,6 +162,16 @@ public: Location get_locus () const; + /* Returns a pointer to a clone of this. The caller is responsible for + * releasing the memory of the returned ty. */ + virtual BaseType *clone () const = 0; + + virtual bool supports_substitutions () const; + + virtual bool has_subsititions_defined () const; + + virtual bool needs_generic_substitutions () const; + protected: BaseType (HirId ref, HirId ty_ref, TypeKind kind, RustIdent ident, std::set<HirId> refs = std::set<HirId> ()); |