fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
5.4 KiB138 linesraw
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
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:5
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
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
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
45   |
46LL |     let gen_clone_1 = move || {
47   |                       ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
48...
49LL |     check_copy(&gen_clone_1);
50   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`
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
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
65   |
66LL |     let gen_clone_1 = move || {
67   |                       ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
68...
69LL |     check_copy(&gen_clone_1);
70   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`
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
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
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
88   |
89LL |     let gen_non_clone = move || {
90   |                         ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
91...
92LL |     check_copy(&gen_non_clone);
93   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`
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   |
107LL + #[derive(Copy)]
108LL | struct NonClone;
109   |
110
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
113   |
114LL |     let gen_non_clone = move || {
115   |                         ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
116...
117LL |     check_clone(&gen_non_clone);
118   |     ^^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`
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   |
132LL + #[derive(Clone)]
133LL | struct NonClone;
134   |
135
136error: aborting due to 6 previous errors
137
138For more information about this error, try `rustc --explain E0277`.