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