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