]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generator/issue-68112.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / generator / issue-68112.stderr
CommitLineData
ba9703b0
XL
1error: generator cannot be sent between threads safely
2 --> $DIR/issue-68112.rs:33:5
3 |
4LL | fn require_send(_: impl Send) {}
5 | ---- required by this bound in `require_send`
6...
7LL | require_send(send_gen);
8 | ^^^^^^^^^^^^ generator is not `Send`
9 |
1b1a35ee 10 = help: the trait `Sync` is not implemented for `RefCell<i32>`
ba9703b0
XL
11note: generator is not `Send` as this value is used across a yield
12 --> $DIR/issue-68112.rs:31:9
13 |
14LL | let _non_send_gen = make_non_send_generator();
1b1a35ee 15 | ------------- has type `impl Generator` which is not `Send`
ba9703b0
XL
16LL | yield;
17 | ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
18LL | };
19 | - `_non_send_gen` is later dropped here
20
1b1a35ee 21error[E0277]: `RefCell<i32>` cannot be shared between threads safely
ba9703b0
XL
22 --> $DIR/issue-68112.rs:52:5
23 |
24LL | fn require_send(_: impl Send) {}
25 | ---- required by this bound in `require_send`
26...
27LL | require_send(send_gen);
1b1a35ee 28 | ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
ba9703b0 29 |
1b1a35ee
XL
30 = help: the trait `Sync` is not implemented for `RefCell<i32>`
31 = note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
136023e0 32 = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:38:5: 41:6]`
1b1a35ee
XL
33 = note: required because it appears within the type `impl Generator`
34 = note: required because it appears within the type `impl Generator`
35 = note: required because it appears within the type `{impl Generator, ()}`
136023e0 36 = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:48:20: 51:6]`
ba9703b0
XL
37
38error: aborting due to 2 previous errors
39
40For more information about this error, try `rustc --explain E0277`.