From: hriztam <[email protected]>

gcc/rust/ChangeLog:

        * ast/rust-fmt.h: Explicitly instantiate FFIVec<Piece>.

Signed-off-by: Hritam Shrivastava <[email protected]>
---
 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 4577665dc93..a7741981f53 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,
-- 
2.50.1

Reply via email to