aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-04-25 14:43:15 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:37:20 +0100
commitf5d02c4f5592b717a3aad5304308df913bf4ab1b (patch)
treee95c70e36d05336fdb8618a1cc9d6bb0d914124e /gcc/rust/ast/rust-expr.h
parent90effeedc48a187831ba71cabf616650c98a011b (diff)
downloadgcc-f5d02c4f5592b717a3aad5304308df913bf4ab1b.zip
gcc-f5d02c4f5592b717a3aad5304308df913bf4ab1b.tar.gz
gcc-f5d02c4f5592b717a3aad5304308df913bf4ab1b.tar.bz2
gccrs: ast: Add `outer_attrs` to all `Item`s
gcc/rust/ChangeLog: * ast/rust-ast.h: Add `outer_attrs` to Item. * ast/rust-expr.h: Make use of new inheritance methods. * ast/rust-item.h: Likewise. * ast/rust-macro.h: Likewise.
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 2b23c24..3e7c93c 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -2762,15 +2762,15 @@ protected:
public:
Location get_locus () const override final { return locus; }
- // should never be called - error if called
- void set_outer_attrs (std::vector<Attribute> /* new_attrs */) override
+ std::vector<Attribute> &get_outer_attrs () override final
{
+ // RangeExpr cannot have any outer attributes
rust_assert (false);
}
- std::vector<Attribute> &get_outer_attrs () override
+ // should never be called - error if called
+ void set_outer_attrs (std::vector<Attribute> /* new_attrs */) override
{
- // RangeExpr cannot have any outer attributes
rust_assert (false);
}
};