]> git.proxmox.com Git - rustc.git/blame - tests/ui/generator/clone-impl.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui / generator / clone-impl.stderr
CommitLineData
781aab86
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:5
f2b60f7d
FG
3 |
4LL | let gen_clone_0 = move || {
781aab86 5 | ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
f2b60f7d
FG
6...
7LL | 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 |
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
781aab86
FG
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:5
f2b60f7d
FG
23 |
24LL | let gen_clone_0 = move || {
781aab86 25 | ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
f2b60f7d
FG
26...
27LL | 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 |
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
f2b60f7d
FG
37note: required by a bound in `check_copy`
38 --> $DIR/clone-impl.rs:72:18
39 |
40LL | fn check_copy<T: Copy>(_x: &T) {}
41 | ^^^^ required by this bound in `check_copy`
42
781aab86
FG
43error[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 |
46LL | let gen_clone_1 = move || {
781aab86 47 | ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
f2b60f7d
FG
48...
49LL | 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 |
52note: captured value does not implement `Copy`
53 --> $DIR/clone-impl.rs:56:14
54 |
55LL | drop(clonable_1);
56 | ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
57note: required by a bound in `check_copy`
58 --> $DIR/clone-impl.rs:72:18
59 |
60LL | fn check_copy<T: Copy>(_x: &T) {}
61 | ^^^^ required by this bound in `check_copy`
62
781aab86
FG
63error[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 |
66LL | let gen_clone_1 = move || {
781aab86 67 | ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
f2b60f7d
FG
68...
69LL | 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 |
72note: generator does not implement `Copy` as this value is used across a yield
73 --> $DIR/clone-impl.rs:52:9
74 |
75LL | let v = vec!['a'];
76 | - has type `Vec<char>` which does not implement `Copy`
77...
78LL | yield;
79 | ^^^^^ yield occurs here, with `v` maybe used later
f2b60f7d
FG
80note: required by a bound in `check_copy`
81 --> $DIR/clone-impl.rs:72:18
82 |
83LL | fn check_copy<T: Copy>(_x: &T) {}
84 | ^^^^ required by this bound in `check_copy`
85
781aab86
FG
86error[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 |
89LL | let gen_non_clone = move || {
781aab86 90 | ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
f2b60f7d
FG
91...
92LL | 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 |
95note: captured value does not implement `Copy`
96 --> $DIR/clone-impl.rs:64:14
97 |
98LL | drop(non_clonable);
99 | ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy`
100note: required by a bound in `check_copy`
101 --> $DIR/clone-impl.rs:72:18
102 |
103LL | fn check_copy<T: Copy>(_x: &T) {}
104 | ^^^^ required by this bound in `check_copy`
105help: consider annotating `NonClone` with `#[derive(Copy)]`
106 |
353b0b11
FG
107LL + #[derive(Copy)]
108LL | struct NonClone;
f2b60f7d
FG
109 |
110
781aab86
FG
111error[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 |
114LL | let gen_non_clone = move || {
781aab86 115 | ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
f2b60f7d
FG
116...
117LL | 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 |
120note: captured value does not implement `Clone`
121 --> $DIR/clone-impl.rs:64:14
122 |
123LL | drop(non_clonable);
124 | ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone`
125note: required by a bound in `check_clone`
126 --> $DIR/clone-impl.rs:73:19
127 |
128LL | fn check_clone<T: Clone>(_x: &T) {}
129 | ^^^^^ required by this bound in `check_clone`
130help: consider annotating `NonClone` with `#[derive(Clone)]`
131 |
353b0b11
FG
132LL + #[derive(Clone)]
133LL | struct NonClone;
f2b60f7d
FG
134 |
135
136error: aborting due to 6 previous errors
137
138For more information about this error, try `rustc --explain E0277`.