]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: rust: Explicitly instantiate FFIVec<Piece> for C-linkage
authorhriztam <hritamstark05@gmail.com>
Thu, 26 Feb 2026 13:19:20 +0000 (18:49 +0530)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 14 Apr 2026 21:48:35 +0000 (23:48 +0200)
gcc/rust/ChangeLog:

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

Signed-off-by: Hritam Shrivastava <hritamstark05@gmail.com>
gcc/rust/ast/rust-fmt.h

index 4577665dc93b70ec67baceec70b0afad515f7921..a7741981f5396143fbaea408a1e9e683a4d7c9ba 100644 (file)
@@ -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,