diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-03-10 18:08:18 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-17 10:34:36 +0000 |
commit | bab564903706658ce8fa3704b656eeb1dce53330 (patch) | |
tree | 1185c687fc36573f9293e761b6c66cd5c4300062 | |
parent | d6e39f781eec041aad061b1cee35c99e2ad37868 (diff) | |
download | gcc-bab564903706658ce8fa3704b656eeb1dce53330.zip gcc-bab564903706658ce8fa3704b656eeb1dce53330.tar.gz gcc-bab564903706658ce8fa3704b656eeb1dce53330.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>
-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 ce17c18..dfc02a9 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> ()); |