]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Remove PathExpr abstract class
authorArthur Cohen <arthur.cohen@embecosm.com>
Mon, 24 Jun 2024 15:04:13 +0000 (17:04 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:04 +0000 (15:32 +0100)
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 4f40efff2a9d437bd57c4f864bdf5c96631dfa49..f5a2e77af3f948ea523b6c989dc09db522b66a84 100644 (file)
@@ -2048,11 +2048,6 @@ public:
   }
 };
 
-// Base path expression AST node - abstract
-class PathExpr : public ExprWithoutBlock
-{
-};
-
 } // namespace AST
 } // namespace Rust
 
index 53ccf1dbb6b4e7c0eb8e13fe1101bc292c38d2e8..bf758018b58a93eef41555df1f27b5909b66a9a9 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;