]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-clone-closure.stderr
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / ui / not-clone-closure.stderr
1 error[E0277]: the trait bound `S: Clone` is not satisfied in `[closure@$DIR/not-clone-closure.rs:7:17: 7:24]`
2   --> $DIR/not-clone-closure.rs:11:17
3    |
4 LL |     let hello = move || {
5    |                 ------- within this `[closure@$DIR/not-clone-closure.rs:7:17: 7:24]`
6 ...
7 LL |     let hello = hello.clone();
8    |                 ^^^^^ ----- required by a bound introduced by this call
9    |                 |
10    |                 within `[closure@$DIR/not-clone-closure.rs:7:17: 7:24]`, the trait `Clone` is not implemented for `S`
11    |
12 note: required because it's used within this closure
13   --> $DIR/not-clone-closure.rs:7:17
14    |
15 LL |     let hello = move || {
16    |                 ^^^^^^^
17 help: consider annotating `S` with `#[derive(Clone)]`
18    |
19 LL | #[derive(Clone)]
20    |
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0277`.