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<SharedString> {}
        |                                  ^^ 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)
This commit is contained in:
David Tolnay 2021-05-01 14:28:38 -07:00
parent 78c0c688b8
commit 0fa63a1980
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -326,6 +326,7 @@ pub mod ffi {
}
impl Box<Shared> {}
impl CxxVector<SharedString> {}
}
mod other {