blob: be693cd2c214b3ce6c0fbffb04186e3030e79c63 [file] [log] [blame]
David Tolnaydcc1db82021-01-27 11:25:48 -08001use cxx::{let_cxx_string, CxxString};
2
3#[test]
4fn test_async_cxx_string() {
5 async fn f() {
6 let_cxx_string!(s = "...");
7
8 async fn g(_: &CxxString) {}
9 g(&s).await;
10 }
11
12 // https://github.com/dtolnay/cxx/issues/693
13 fn assert_send(_: impl Send) {}
14 assert_send(f());
15}