diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-31 13:08:06 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:04:32 +0100 |
commit | 872ea1ab969425c0db804d78d8c3fa2a8144accd (patch) | |
tree | a45bd3092a765e6a2b3129b76a1337b32b06eed0 | |
parent | 90ee631428f0af1d91ee297ea114755d7f0563c7 (diff) | |
download | gcc-872ea1ab969425c0db804d78d8c3fa2a8144accd.zip gcc-872ea1ab969425c0db804d78d8c3fa2a8144accd.tar.gz gcc-872ea1ab969425c0db804d78d8c3fa2a8144accd.tar.bz2 |
gccrs: Ease some constraints on derive definition
Member function is_derive was overly constrained, the attribute changes
when we parse it's meta items and it no longer contains a tokenstream
while staying a derive.
gcc/rust/ChangeLog:
* ast/rust-ast.cc (Attribute::is_derive): Remove tokenstream
condition.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r-- | gcc/rust/ast/rust-ast.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 3525a15..1349946 100644 --- a/gcc/rust/ast/rust-ast.cc +++ b/gcc/rust/ast/rust-ast.cc @@ -84,10 +84,7 @@ Attribute::as_string () const bool Attribute::is_derive () const { - return has_attr_input () - && get_attr_input ().get_attr_input_type () - == AST::AttrInput::TOKEN_TREE - && get_path () == "derive"; + return has_attr_input () && get_path () == "derive"; } /** |