]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-clone-closure.stderr
Rollup merge of #95503 - jyn514:build-single-crate, r=Mark-Simulacrum
[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: 9:6]`
2   --> $DIR/not-clone-closure.rs:11:23
3    |
4 LL |       let hello = move || {
5    |  _________________-
6 LL | |         println!("Hello {}", a.0);
7 LL | |     };
8    | |_____- within this `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`
9 LL |
10 LL |       let hello = hello.clone();
11    |                         ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`, the trait `Clone` is not implemented for `S`
12    |
13 note: required because it's used within this closure
14   --> $DIR/not-clone-closure.rs:7:17
15    |
16 LL |       let hello = move || {
17    |  _________________^
18 LL | |         println!("Hello {}", a.0);
19 LL | |     };
20    | |_____^
21 help: consider annotating `S` with `#[derive(Clone)]`
22    |
23 LL | #[derive(Clone)]
24    |
25
26 error: aborting due to previous error
27
28 For more information about this error, try `rustc --explain E0277`.