Use Places to express closure/generator Captures
Co-authored-by: Archer Zhang <archer.xn@gmail.com>
This commit is contained in:
parent
cf9cf7c923
commit
127a6ede1d
6 changed files with 313 additions and 129 deletions
|
|
@ -8,8 +8,8 @@ LL | assert_send(|| {
|
|||
| ^^^^^^^^^^^ `Cell<i32>` cannot be shared between threads safely
|
||||
|
|
||||
= help: the trait `Sync` is not implemented for `Cell<i32>`
|
||||
= note: required because of the requirements on the impl of `Send` for `&'_#3r Cell<i32>`
|
||||
= note: required because it appears within the type `[main::{closure#1} upvar_tys=(&'_#3r Cell<i32>) _#17t]`
|
||||
= note: required because of the requirements on the impl of `Send` for `&'_#4r Cell<i32>`
|
||||
= note: required because it appears within the type `[main::{closure#1} upvar_tys=(&'_#4r Cell<i32>) _#17t]`
|
||||
|
||||
error: generator cannot be shared between threads safely
|
||||
--> $DIR/generator-print-verbose-2.rs:12:5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue