From: Pierre-Emmanuel Patry Date: Mon, 31 Jul 2023 11:08:06 +0000 (+0200) Subject: gccrs: Ease some constraints on derive definition X-Git-Tag: basepoints/gcc-15~2161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=872ea1ab969425c0db804d78d8c3fa2a8144accd;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 3525a15beb58..13499461b1c9 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"; } /**