Signed-off-by: hmz007 <hmz007@gmail.com> Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
16 lines
306 B
Rust
16 lines
306 B
Rust
use cxx::{let_cxx_string, CxxString};
|
|
|
|
#[test]
|
|
fn test_async_cxx_string() {
|
|
async fn f() {
|
|
let_cxx_string!(s = "...");
|
|
|
|
async fn g(_: &CxxString) {}
|
|
g(&s).await;
|
|
}
|
|
|
|
// https://github.com/dtolnay/cxx/issues/693
|
|
fn assert_send(_: impl Send) {}
|
|
assert_send(f());
|
|
}
|