]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
gccrs: group basetype virtuals together and remove unused virtual
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 10 Mar 2023 18:08:18 +0000 (18:08 +0000)
committerPhilip Herron <philip.herron@embecosm.com>
Fri, 17 Mar 2023 10:34:36 +0000 (10:34 +0000)
gcc/rust/ChangeLog:

* typecheck/rust-tyty.h: cleanup ordering of header

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-tyty.h

index ce17c18fcabcd455775f6b643af12fd792ebe7df..dfc02a9112667b98b488ba1292509b23c27fd48a 100644 (file)
@@ -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> ());