Rollup merge of #126632 - Vonr:fix/moving-closure-formatting-v2, r=Nilstrieb
Replace `move||` with `move ||` Edit from #126631 to revert changes in `tests/ui`. There are 18 instances of `move||` across 6 files in the repo: - `compiler/rustc_hir_typeck/src/typeck_root_ctxt.rs` - `library/core/src/sync/atomic.rs` - `library/std/src/sync/condvar.rs` - `library/std/src/sync/mpsc/mod.rs` - `library/std/src/sync/barrier.rs` - `library/std/src/thread/local.rs` I have replaced all such instances with `move ||` instead as it better adheres to modern formatting standards. Ideally, we would have this automated by rustfmt or some other tool, but I do not have the time to implement such a feature or tool. Nonetheless, I would encourage any effort invested into such a tool or feature.
This commit is contained in:
commit
7450ab7acb
6 changed files with 18 additions and 18 deletions
|
@ -22,7 +22,7 @@ use std::ops::Deref;
|
|||
/// e.g. closures defined within the function. For example:
|
||||
/// ```ignore (illustrative)
|
||||
/// fn foo() {
|
||||
/// bar(move|| { ... })
|
||||
/// bar(move || { ... })
|
||||
/// }
|
||||
/// ```
|
||||
/// Here, the function `foo()` and the closure passed to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue