]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: parser: Fix attribute differentation
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 17 Apr 2023 14:20:32 +0000 (16:20 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:09 +0000 (18:34 +0100)
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 <pierre-emmanuel.patry@embecosm.com>
gcc/rust/parse/rust-parse-impl.h

index 6d20f480bb7ba1ba78f4ee1b531fb571ebd725cc..13f05419f41de5e506e9cf477f21787823b426eb 100644 (file)
@@ -1222,7 +1222,7 @@ Parser<ManagedTokenSource>::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 ();