]>
Commit | Line | Data |
---|---|---|
781aab86 FG |
1 | error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:36:23: 36:30}` |
2 | --> $DIR/clone-impl.rs:42:5 | |
f2b60f7d FG |
3 | | |
4 | LL | let gen_clone_0 = move || { | |
781aab86 | 5 | | ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}` |
f2b60f7d FG |
6 | ... |
7 | LL | check_copy(&gen_clone_0); | |
781aab86 | 8 | | ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>` |
f2b60f7d FG |
9 | | |
10 | note: captured value does not implement `Copy` | |
11 | --> $DIR/clone-impl.rs:40:14 | |
12 | | | |
13 | LL | drop(clonable_0); | |
14 | | ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy` | |
15 | note: required by a bound in `check_copy` | |
16 | --> $DIR/clone-impl.rs:72:18 | |
17 | | | |
18 | LL | fn check_copy<T: Copy>(_x: &T) {} | |
19 | | ^^^^ required by this bound in `check_copy` | |
20 | ||
781aab86 FG |
21 | error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:36:23: 36:30}` |
22 | --> $DIR/clone-impl.rs:42:5 | |
f2b60f7d FG |
23 | | |
24 | LL | let gen_clone_0 = move || { | |
781aab86 | 25 | | ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}` |
f2b60f7d FG |
26 | ... |
27 | LL | check_copy(&gen_clone_0); | |
781aab86 | 28 | | ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>` |
f2b60f7d FG |
29 | | |
30 | note: generator does not implement `Copy` as this value is used across a yield | |
31 | --> $DIR/clone-impl.rs:38:9 | |
32 | | | |
33 | LL | let v = vec!['a']; | |
34 | | - has type `Vec<char>` which does not implement `Copy` | |
35 | LL | yield; | |
36 | | ^^^^^ yield occurs here, with `v` maybe used later | |
f2b60f7d FG |
37 | note: required by a bound in `check_copy` |
38 | --> $DIR/clone-impl.rs:72:18 | |
39 | | | |
40 | LL | fn check_copy<T: Copy>(_x: &T) {} | |
41 | | ^^^^ required by this bound in `check_copy` | |
42 | ||
781aab86 FG |
43 | error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:46:23: 46:30}` |
44 | --> $DIR/clone-impl.rs:58:5 | |
f2b60f7d FG |
45 | | |
46 | LL | let gen_clone_1 = move || { | |
781aab86 | 47 | | ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}` |
f2b60f7d FG |
48 | ... |
49 | LL | check_copy(&gen_clone_1); | |
781aab86 | 50 | | ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>` |
f2b60f7d FG |
51 | | |
52 | note: captured value does not implement `Copy` | |
53 | --> $DIR/clone-impl.rs:56:14 | |
54 | | | |
55 | LL | drop(clonable_1); | |
56 | | ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy` | |
57 | note: required by a bound in `check_copy` | |
58 | --> $DIR/clone-impl.rs:72:18 | |
59 | | | |
60 | LL | fn check_copy<T: Copy>(_x: &T) {} | |
61 | | ^^^^ required by this bound in `check_copy` | |
62 | ||
781aab86 FG |
63 | error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:46:23: 46:30}` |
64 | --> $DIR/clone-impl.rs:58:5 | |
f2b60f7d FG |
65 | | |
66 | LL | let gen_clone_1 = move || { | |
781aab86 | 67 | | ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}` |
f2b60f7d FG |
68 | ... |
69 | LL | check_copy(&gen_clone_1); | |
781aab86 | 70 | | ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>` |
f2b60f7d FG |
71 | | |
72 | note: generator does not implement `Copy` as this value is used across a yield | |
73 | --> $DIR/clone-impl.rs:52:9 | |
74 | | | |
75 | LL | let v = vec!['a']; | |
76 | | - has type `Vec<char>` which does not implement `Copy` | |
77 | ... | |
78 | LL | yield; | |
79 | | ^^^^^ yield occurs here, with `v` maybe used later | |
f2b60f7d FG |
80 | note: required by a bound in `check_copy` |
81 | --> $DIR/clone-impl.rs:72:18 | |
82 | | | |
83 | LL | fn check_copy<T: Copy>(_x: &T) {} | |
84 | | ^^^^ required by this bound in `check_copy` | |
85 | ||
781aab86 FG |
86 | error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:62:25: 62:32}` |
87 | --> $DIR/clone-impl.rs:66:5 | |
f2b60f7d FG |
88 | | |
89 | LL | let gen_non_clone = move || { | |
781aab86 | 90 | | ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}` |
f2b60f7d FG |
91 | ... |
92 | LL | check_copy(&gen_non_clone); | |
781aab86 | 93 | | ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone` |
f2b60f7d FG |
94 | | |
95 | note: captured value does not implement `Copy` | |
96 | --> $DIR/clone-impl.rs:64:14 | |
97 | | | |
98 | LL | drop(non_clonable); | |
99 | | ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy` | |
100 | note: required by a bound in `check_copy` | |
101 | --> $DIR/clone-impl.rs:72:18 | |
102 | | | |
103 | LL | fn check_copy<T: Copy>(_x: &T) {} | |
104 | | ^^^^ required by this bound in `check_copy` | |
105 | help: consider annotating `NonClone` with `#[derive(Copy)]` | |
106 | | | |
353b0b11 FG |
107 | LL + #[derive(Copy)] |
108 | LL | struct NonClone; | |
f2b60f7d FG |
109 | | |
110 | ||
781aab86 FG |
111 | error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{generator@$DIR/clone-impl.rs:62:25: 62:32}` |
112 | --> $DIR/clone-impl.rs:68:5 | |
f2b60f7d FG |
113 | | |
114 | LL | let gen_non_clone = move || { | |
781aab86 | 115 | | ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}` |
f2b60f7d FG |
116 | ... |
117 | LL | check_clone(&gen_non_clone); | |
781aab86 | 118 | | ^^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone` |
f2b60f7d FG |
119 | | |
120 | note: captured value does not implement `Clone` | |
121 | --> $DIR/clone-impl.rs:64:14 | |
122 | | | |
123 | LL | drop(non_clonable); | |
124 | | ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone` | |
125 | note: required by a bound in `check_clone` | |
126 | --> $DIR/clone-impl.rs:73:19 | |
127 | | | |
128 | LL | fn check_clone<T: Clone>(_x: &T) {} | |
129 | | ^^^^^ required by this bound in `check_clone` | |
130 | help: consider annotating `NonClone` with `#[derive(Clone)]` | |
131 | | | |
353b0b11 FG |
132 | LL + #[derive(Clone)] |
133 | LL | struct NonClone; | |
f2b60f7d FG |
134 | | |
135 | ||
136 | error: aborting due to 6 previous errors | |
137 | ||
138 | For more information about this error, try `rustc --explain E0277`. |