]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ast: Remove PathExpr abstract class
authorArthur Cohen <arthur.cohen@embecosm.com>
Mon, 24 Jun 2024 15:04:13 +0000 (17:04 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 19 Aug 2024 12:39:49 +0000 (12:39 +0000)
Inherit directly from ExprWithoutBlock instead.

gcc/rust/ChangeLog:

* ast/rust-ast.h (class PathExpr): Remove class.
* ast/rust-path.h (class PathInExpression): Inherit from ExprWithoutBlock.
(class QualifiedPathInExpression): Likewise.

gcc/rust/ast/rust-ast.h
gcc/rust/ast/rust-path.h

index d9edec0638798c3d85fd9ba844c0fbaff1afe0ea..dc0fd8b0e4783ee746228f22e643f8f1e3185c3d 100644 (file)
@@ -2048,11 +2048,6 @@ public:
   }
 };
 
-// Base path expression AST node - abstract
-class PathExpr : public ExprWithoutBlock
-{
-};
-
 } // namespace AST
 } // namespace Rust
 
index cf954d69a397c60856cd6b525b96940e1f38030c..c3f25d1c1f7c2a0f8ee052c7c9d6f4bf966a12bf 100644 (file)
@@ -597,7 +597,7 @@ public:
 
 /* AST node representing a path-in-expression pattern (path that allows
  * generic arguments) */
-class PathInExpression : public PathPattern, public PathExpr
+class PathInExpression : public PathPattern, public ExprWithoutBlock
 {
   std::vector<Attribute> outer_attrs;
   bool has_opening_scope_resolution;
@@ -1221,7 +1221,7 @@ public:
 
 /* AST node representing a qualified path-in-expression pattern (path that
  * allows specifying trait functions) */
-class QualifiedPathInExpression : public PathPattern, public PathExpr
+class QualifiedPathInExpression : public PathPattern, public ExprWithoutBlock
 {
   std::vector<Attribute> outer_attrs;
   QualifiedPathType path_type;