fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error: future cannot be shared between threads safely 2 --> $DIR/issue-64130-1-sync.rs:21:5 3 | 4LL | fn is_sync<T: Sync>(t: T) { } 5 | ------- ---- required by this bound in `is_sync` 6... 7LL | is_sync(bar()); 8 | ^^^^^^^ future returned by `bar` is not `Sync` 9 | 10 = help: within `impl std::future::Future`, the trait `std::marker::Sync` is not implemented for `Foo` 11note: future is not `Sync` as this value is used across an await 12 --> $DIR/issue-64130-1-sync.rs:15:5 13 | 14LL | let x = Foo; 15 | - has type `Foo` 16LL | baz().await; 17 | ^^^^^^^^^^^ await occurs here, with `x` maybe used later 18LL | } 19 | - `x` is later dropped here 20 21error: aborting due to previous error 22