fwd/vendor/cxx/tests/ui/vector_autotraits.rs
John Doty 9c435dc440 Vendor dependencies
Let's see how I like this workflow.
2022-12-19 08:38:22 -08:00

21 lines
385 B
Rust

use cxx::CxxVector;
#[cxx::bridge]
mod ffi {
extern "C++" {
type ThreadSafe;
type NotThreadSafe;
}
impl CxxVector<ThreadSafe> {}
impl CxxVector<NotThreadSafe> {}
}
unsafe impl Send for ffi::ThreadSafe {}
fn assert_send<T: Send>() {}
fn main() {
assert_send::<CxxVector<ffi::ThreadSafe>>();
assert_send::<CxxVector<ffi::NotThreadSafe>>();
}