]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-clone-closure.stderr
Auto merge of #97577 - betrusted-io:add-xous-target, r=nagisa
[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 appears within the type `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`
14 help: consider annotating `S` with `#[derive(Clone)]`
15    |
16 LL | #[derive(Clone)]
17    |
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0277`.