From: Pierre-Emmanuel Patry Date: Mon, 17 Apr 2023 14:20:32 +0000 (+0200) Subject: gccrs: parser: Fix attribute differentation X-Git-Tag: basepoints/gcc-15~2656 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9113e0760682d809fca60e9189c1721e4acf9c6f;p=thirdparty%2Fgcc.git gccrs: parser: Fix attribute differentation In some cases, while parsing an outer attribute, the parser would return an inner attribute. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_outer_attribute): Fix attribute status. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 6d20f480bb7b..13f05419f41d 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -1222,7 +1222,7 @@ Parser::parse_outer_attribute () auto input = std::move (std::get<1> (values)); auto loc = std::get<2> (values); auto actual_attribute - = AST::Attribute (std::move (path), std::move (input), loc, true); + = AST::Attribute (std::move (path), std::move (input), loc, false); if (lexer.peek_token ()->get_id () != RIGHT_SQUARE) return AST::Attribute::create_empty ();