blob: 714e5aa3d9e3cf198baef257a2e3d608c0a81ec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  | 
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
  --> $DIR/clone-impl.rs:47:16
   |
LL |     move || {
   |     ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
...
LL |     check_copy(&gen_clone_0);
   |                ^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<u32>`
   |
note: captured value does not implement `Copy`
  --> $DIR/clone-impl.rs:45: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:91:18
   |
LL | fn check_copy<T: Copy>(_x: &T) {}
   |                  ^^^^ required by this bound in `check_copy`
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`
  --> $DIR/clone-impl.rs:73:16
   |
LL |     move || {
   |     ------- within this `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`
...
LL |     check_copy(&gen_clone_1);
   |                ^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`, the trait `Copy` is not implemented for `Vec<u32>`
   |
note: captured value does not implement `Copy`
  --> $DIR/clone-impl.rs:71: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:91:18
   |
LL | fn check_copy<T: Copy>(_x: &T) {}
   |                  ^^^^ required by this bound in `check_copy`
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
  --> $DIR/clone-impl.rs:85:16
   |
LL |     move || {
   |     ------- within this `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
...
LL |     check_copy(&gen_non_clone);
   |                ^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`, the trait `Copy` is not implemented for `NonClone`
   |
note: captured value does not implement `Copy`
  --> $DIR/clone-impl.rs:83: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:91:18
   |
LL | fn check_copy<T: Copy>(_x: &T) {}
   |                  ^^^^ required by this bound in `check_copy`
help: consider annotating `NonClone` with `#[derive(Copy)]`
   |
LL + #[derive(Copy)]
LL | struct NonClone;
   |
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
  --> $DIR/clone-impl.rs:87:17
   |
LL |     move || {
   |     ------- within this `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
...
LL |     check_clone(&gen_non_clone);
   |                 ^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`, the trait `Clone` is not implemented for `NonClone`
   |
note: captured value does not implement `Clone`
  --> $DIR/clone-impl.rs:83: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:92:19
   |
LL | fn check_clone<T: Clone>(_x: &T) {}
   |                   ^^^^^ required by this bound in `check_clone`
help: consider annotating `NonClone` with `#[derive(Clone)]`
   |
LL + #[derive(Clone)]
LL | struct NonClone;
   |
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`
  --> $DIR/clone-impl.rs:59:5
   |
LL |     move || {
   |     ------- within this `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`
...
LL |     check_copy(&gen_clone_1);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`, the trait `Copy` is not implemented for `Vec<char>`
   |
note: coroutine does not implement `Copy` as this value is used across a yield
  --> $DIR/clone-impl.rs:56: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:91:18
   |
LL | fn check_copy<T: Copy>(_x: &T) {}
   |                  ^^^^ required by this bound in `check_copy`
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0277`.
 
  |