| David Tolnay | dcc1db8 | 2021-01-27 11:25:48 -0800 | [diff] [blame] | 1 | use cxx::{let_cxx_string, CxxString}; |
| 2 | |||||
| 3 | #[test] | ||||
| 4 | fn 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 | } | ||||