fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: generator cannot be shared between threads safely 2 --> $DIR/generator-print-verbose-2.rs:17:5 3 | 4LL | assert_sync(|| { 5 | ^^^^^^^^^^^ generator is not `Sync` 6 | 7 = help: within `{main::{closure#0} upvar_tys=() {main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync` 8note: generator is not `Sync` as this value is used across a yield 9 --> $DIR/generator-print-verbose-2.rs:20:9 10 | 11LL | let a = NotSync; 12 | - has type `NotSync` which is not `Sync` 13LL | yield; 14 | ^^^^^ yield occurs here, with `a` maybe used later 15note: required by a bound in `assert_sync` 16 --> $DIR/generator-print-verbose-2.rs:14:23 17 | 18LL | fn assert_sync<T: Sync>(_: T) {} 19 | ^^^^ required by this bound in `assert_sync` 20 21error: generator cannot be sent between threads safely 22 --> $DIR/generator-print-verbose-2.rs:24:5 23 | 24LL | assert_send(|| { 25 | ^^^^^^^^^^^ generator is not `Send` 26 | 27 = help: within `{main::{closure#1} upvar_tys=() {main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend` 28note: generator is not `Send` as this value is used across a yield 29 --> $DIR/generator-print-verbose-2.rs:27:9 30 | 31LL | let a = NotSend; 32 | - has type `NotSend` which is not `Send` 33LL | yield; 34 | ^^^^^ yield occurs here, with `a` maybe used later 35note: required by a bound in `assert_send` 36 --> $DIR/generator-print-verbose-2.rs:15:23 37 | 38LL | fn assert_send<T: Send>(_: T) {} 39 | ^^^^ required by this bound in `assert_send` 40 41error: aborting due to 2 previous errors 42