You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error is wrong, std::string is fine to access from across threads.
use cxx::{let_cxx_string,CxxString};asyncfnf(){let_cxx_string!(s = "...");asyncfng(_:&CxxString){}g(&s).await;}fnmain(){fnassert_send(_:implSend){}assert_send(f());}
error: future cannot be sent between threads safely --> src/main.rs:12:5 |11 | fn assert_send(_: impl Send) {} | ---- required by this bound in `assert_send`12 | assert_send(f()); | ^^^^^^^^^^^ future returned by `f` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `*const ()`note: future is not `Send` as this value is used across an await --> src/main.rs:7:5 |4 | let_cxx_string!(s = "..."); | --------------------------- has type `StackString` which is not `Send`...7 | g(&s).await; | ^^^^^^^^^^^ await occurs here, with `mut $var` maybe used later8 | } | - `mut $var` is later dropped here
The text was updated successfully, but these errors were encountered:
This error is wrong, std::string is fine to access from across threads.
The text was updated successfully, but these errors were encountered: