From: hriztam <[email protected]>
gcc/rust/ChangeLog:
* ast/rust-fmt.h: Explicitly instantiate FFIVec<Piece>.
Signed-off-by: Hritam Shrivastava <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github:
https://github.com/Rust-GCC/gccrs/commit/29f1bf1ff31d3e885d7b8ec85fbd1615ba7680de
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4446
gcc/rust/ast/rust-fmt.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/rust/ast/rust-fmt.h b/gcc/rust/ast/rust-fmt.h
index 4577665dc..a7741981f 100644
--- a/gcc/rust/ast/rust-fmt.h
+++ b/gcc/rust/ast/rust-fmt.h
@@ -398,6 +398,10 @@ enum ParseMode
InlineAsm,
};
+// Required to avoid Clang warning about returning an incomplete FFIVec<Piece>
+// from extern "C" functions.
+template class FFIVec<Piece>;
+
extern "C" {
FFIVec<Piece> collect_pieces (RustHamster input, bool append_newline,
base-commit: 6e146f812266b6e39e68d322623a6e538b1f81e3
--
2.53.0