From: Arthur Cohen Date: Mon, 24 Jun 2024 15:04:13 +0000 (+0200) Subject: gccrs: ast: Remove PathExpr abstract class X-Git-Tag: basepoints/gcc-16~1228 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21d5cef96adfb26ea67d03bdfaacbd1fe8742d6e;p=thirdparty%2Fgcc.git gccrs: ast: Remove PathExpr abstract class 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. --- diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 4f40efff2a9..f5a2e77af3f 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -2048,11 +2048,6 @@ public: } }; -// Base path expression AST node - abstract -class PathExpr : public ExprWithoutBlock -{ -}; - } // namespace AST } // namespace Rust diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 53ccf1dbb6b..bf758018b58 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/rust/ast/rust-path.h @@ -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 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 outer_attrs; QualifiedPathType path_type;