]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/not-clone-closure.stderr
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / not-clone-closure.stderr
index 78b35569c21629151808ebd604f076a9b1e40d71..bebf561b120b5280405d92aa73f1474399d05ea6 100644 (file)
@@ -10,7 +10,14 @@ LL |
 LL |       let hello = hello.clone();
    |                         ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`, the trait `Clone` is not implemented for `S`
    |
-   = note: required because it appears within the type `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`
+note: required because it's used within this closure
+  --> $DIR/not-clone-closure.rs:7:17
+   |
+LL |       let hello = move || {
+   |  _________________^
+LL | |         println!("Hello {}", a.0);
+LL | |     };
+   | |_____^
 help: consider annotating `S` with `#[derive(Clone)]`
    |
 LL | #[derive(Clone)]