aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-06-22 16:41:40 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-06-29 12:30:17 +0000
commit31d13f10b6cab68ccfca9a789ffee681aebec6da (patch)
treeeac030c2bd3f6af227d4f4b9f7264b422b0895e4 /gcc/rust
parentcf7095b0c6b1e7629829be98b5c070e4f9c4a679 (diff)
downloadgcc-31d13f10b6cab68ccfca9a789ffee681aebec6da.zip
gcc-31d13f10b6cab68ccfca9a789ffee681aebec6da.tar.gz
gcc-31d13f10b6cab68ccfca9a789ffee681aebec6da.tar.bz2
collector: Fix missing semicolon output
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>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/ast/rust-ast-collector.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index d851066..843ea73 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -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>