A compile of rust trunk with clang produces the following: trunk/gcc/rust/ast/rust-fmt.h:403:15: warning: 'clone_pieces' has C-linkage specified, but returns incomplete type 'FFIVec<Piece>' which could be incompatible with C [-Wreturn-type-c-linkage] trunk/gcc/rust/ast/rust-fmt.h:406:15: warning: 'clone_pieces' has C-linkage specified, but returns incomplete type 'FFIVec<Piece>' which could be incompatible with C [-Wreturn-type-c-linkage] Source code is extern "C" { FFIVec<Piece> collect_pieces (RustHamster input, bool append_newline, ParseMode parse_mode); FFIVec<Piece> clone_pieces (const FFIVec<Piece> &); } // extern "C" I don't think C understands C++ templates. Suggest code rework.
// TODO: Should we instead make an FFIVector struct? type PieceVec<'a> = ffi::FFIVec<ffi::Piece<'a>>;