Matthias Krüger aa8ba54caf
Rollup merge of #124595 - estebank:issue-104232, r=davidtwco
Suggest cloning `Arc` moved into closure

```
error[E0382]: borrow of moved value: `x`
  --> $DIR/moves-based-on-type-capture-clause-bad.rs:9:20
   |
LL |     let x = "Hello world!".to_string();
   |         - move occurs because `x` has type `String`, which does not implement the `Copy` trait
LL |     thread::spawn(move || {
   |                   ------- value moved into closure here
LL |         println!("{}", x);
   |                        - variable moved due to use in closure
LL |     });
LL |     println!("{}", x);
   |                    ^ value borrowed here after move
   |
   = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider cloning the value before moving it into the closure
   |
LL ~     let value = x.clone();
LL ~     thread::spawn(move || {
LL ~         println!("{}", value);
   |
```

Fix rust-lang/rust#104232.
2025-06-26 15:47:16 +02:00
..
2025-06-11 15:30:15 +01:00
2025-06-18 17:51:22 +01:00
2025-06-11 17:49:03 +05:00
2025-06-11 20:51:49 +05:00
2025-06-18 10:20:43 +02:00
2025-06-23 08:45:26 +00:00
2025-06-18 10:20:43 +02:00
2025-06-08 01:14:05 +05:00
2025-06-16 07:30:09 -04:00
2025-06-11 20:51:49 +05:00
2025-06-13 01:16:36 +02:00
2025-06-08 01:14:05 +05:00
2025-06-18 10:20:43 +02:00
2025-06-18 10:20:43 +02:00
2025-06-11 15:30:15 +01:00
2025-06-11 15:30:15 +01:00
2025-06-24 23:00:31 +02:00
2025-06-08 11:25:09 +05:00
2025-06-13 01:16:36 +02:00
2025-06-18 10:20:43 +02:00
2025-06-13 09:20:48 +02:00
2025-06-13 01:16:36 +02:00
2025-06-17 07:27:58 +08:00
2025-06-08 11:25:09 +05:00
2025-06-18 10:20:43 +02:00
2025-06-08 03:44:44 +05:00
2025-06-13 01:16:36 +02:00
2025-06-18 10:20:43 +02:00