From 655da655c1b02c76c7167fe461adbb4e4a3ba1b2 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 31 Jul 2023 13:08:06 +0200 Subject: 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 --- gcc/rust/ast/rust-ast.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 5534590..5bb2134 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"; } /** -- cgit v1.1