#[cxx::bridge]
mod ffi1 {
unsafe extern "C++" {
type A;
}
impl CxxVector<A> {}
}
This code will error with the following:
patterns aren't allowed in foreign function declarations
This is because the __vector_size and __vector_capacity extern functions generate with _ as an argument rather than a single-letter variable. For whatever reason, rust is considering this a pattern match and erroring. The solution, as per the other vector methods, is to just make the argument a single letter or something like _v.
This code will error with the following:
This is because the
__vector_sizeand__vector_capacityextern functions generate with_as an argument rather than a single-letter variable. For whatever reason, rust is considering this a pattern match and erroring. The solution, as per the other vector methods, is to just make the argument a single letter or something like_v.