]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: collector: Fix missing semicolon output
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 22 Jun 2023 14:41:40 +0000 (16:41 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:46:31 +0000 (18:46 +0100)
A final semicolon was missing after every items in an extern block.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::visit): Add
semicolon in extern blocks.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-collector.cc

index d851066373e2aee19f25428121a07410aa68bddb..843ea73281276b78a03383e98ef70f8bfbb0fbb6 100644 (file)
@@ -2225,7 +2225,8 @@ TokenCollector::visit (ExternBlock &block)
        Rust::Token::make_string (Location (), std::move (abi)));
     }
 
-  visit_items_as_block (block.get_extern_items ());
+  visit_items_as_block (block.get_extern_items (),
+                       {Rust::Token::make (SEMICOLON, Location ())});
 }
 
 static std::pair<TokenId, TokenId>