From 0fa63a198069c01e1b97a0201a131c91cdabb61a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 1 May 2021 14:28:38 -0700 Subject: [PATCH] Add regression test of issue 857 This currently fails to compile. error: `extern` block uses type `String`, which is not FFI-safe --> tests/ffi/lib.rs:329:34 | 329 | impl CxxVector {} | ^^ not FFI-safe | note: the lint level is defined here --> tests/ffi/lib.rs:23:1 | 23 | #[cxx::bridge(namespace = "tests")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) --- tests/ffi/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ffi/lib.rs b/tests/ffi/lib.rs index eb889e05..25b4ccdc 100644 --- a/tests/ffi/lib.rs +++ b/tests/ffi/lib.rs @@ -326,6 +326,7 @@ pub mod ffi { } impl Box {} + impl CxxVector {} } mod other {