2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:42:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_clone_0 = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
2022-09-11 06:21:40 +00:00
...
LL | check_copy(&gen_clone_0);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
2022-03-21 05:57:10 +00:00
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:40:14
|
LL | drop(clonable_0);
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
note: required by a bound in `check_copy`
--> $DIR/clone-impl.rs:72:18
|
LL | fn check_copy<T: Copy>(_x: &T) {}
| ^^^^ required by this bound in `check_copy`
2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:42:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_clone_0 = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
2022-09-11 06:21:40 +00:00
...
LL | check_copy(&gen_clone_0);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
2022-03-21 05:57:10 +00:00
|
2023-10-19 21:46:28 +00:00
note: coroutine does not implement `Copy` as this value is used across a yield
2022-03-21 05:57:10 +00:00
--> $DIR/clone-impl.rs:38:9
|
LL | let v = vec!['a'];
| - has type `Vec<char>` which does not implement `Copy`
LL | yield;
| ^^^^^ yield occurs here, with `v` maybe used later
note: required by a bound in `check_copy`
--> $DIR/clone-impl.rs:72:18
|
LL | fn check_copy<T: Copy>(_x: &T) {}
| ^^^^ required by this bound in `check_copy`
2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:58:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_clone_1 = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
2022-09-11 06:21:40 +00:00
...
LL | check_copy(&gen_clone_1);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
2022-03-21 05:57:10 +00:00
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:56:14
|
LL | drop(clonable_1);
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
note: required by a bound in `check_copy`
--> $DIR/clone-impl.rs:72:18
|
LL | fn check_copy<T: Copy>(_x: &T) {}
| ^^^^ required by this bound in `check_copy`
2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:58:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_clone_1 = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
2022-09-11 06:21:40 +00:00
...
LL | check_copy(&gen_clone_1);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
2022-03-21 05:57:10 +00:00
|
2023-10-19 21:46:28 +00:00
note: coroutine does not implement `Copy` as this value is used across a yield
2022-03-21 05:57:10 +00:00
--> $DIR/clone-impl.rs:52:9
|
LL | let v = vec!['a'];
| - has type `Vec<char>` which does not implement `Copy`
...
LL | yield;
| ^^^^^ yield occurs here, with `v` maybe used later
note: required by a bound in `check_copy`
--> $DIR/clone-impl.rs:72:18
|
LL | fn check_copy<T: Copy>(_x: &T) {}
| ^^^^ required by this bound in `check_copy`
2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:66:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_non_clone = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
2022-09-11 06:21:40 +00:00
...
LL | check_copy(&gen_non_clone);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Copy`
2022-03-21 05:57:10 +00:00
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:64:14
|
LL | drop(non_clonable);
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy`
note: required by a bound in `check_copy`
--> $DIR/clone-impl.rs:72:18
|
LL | fn check_copy<T: Copy>(_x: &T) {}
| ^^^^ required by this bound in `check_copy`
2022-04-10 07:28:31 +00:00
help: consider annotating `NonClone` with `#[derive(Copy)]`
|
2023-03-18 02:18:39 +00:00
LL + #[derive(Copy)]
LL | struct NonClone;
2022-04-10 07:28:31 +00:00
|
2022-03-21 05:57:10 +00:00
2023-10-19 21:46:28 +00:00
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
2023-06-24 10:02:54 +00:00
--> $DIR/clone-impl.rs:68:5
2022-09-11 06:21:40 +00:00
|
LL | let gen_non_clone = move || {
2023-10-19 21:46:28 +00:00
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
2022-03-21 05:57:10 +00:00
...
2022-09-11 06:21:40 +00:00
LL | check_clone(&gen_non_clone);
2024-01-29 18:31:02 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Clone`
2022-03-21 05:57:10 +00:00
|
note: captured value does not implement `Clone`
--> $DIR/clone-impl.rs:64:14
|
LL | drop(non_clonable);
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone`
note: required by a bound in `check_clone`
--> $DIR/clone-impl.rs:73:19
|
LL | fn check_clone<T: Clone>(_x: &T) {}
| ^^^^^ required by this bound in `check_clone`
2022-04-10 07:28:31 +00:00
help: consider annotating `NonClone` with `#[derive(Clone)]`
|
2023-03-18 02:18:39 +00:00
LL + #[derive(Clone)]
LL | struct NonClone;
2022-04-10 07:28:31 +00:00
|
2022-03-21 05:57:10 +00:00
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0277`.