Closed

Description
Source: https://travis-ci.org/rust-lang/cargo/jobs/453802414#L938-L949
error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> src/cargo/core/compiler/job_queue.rs:412:23
|
399 | let doit = move || {
| ------- takes 0 arguments
...
412 | scope.spawn(doit);
| ^^^^^ expected closure that takes 1 argument
help: consider changing the closure to take and ignore the expected argument
|
399 | let doit = |_| {
| ^^^
The suggestion is to use: let doit = |_| {
But I think it should be: let doit = move |_| {
We should probably respect other modifiers like static
and async
, too.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
csmoe commentedon Nov 13, 2018
cc #52647
@estebank that's a bit strange, why the prefix is missed in suggestions?
estebank commentedon Nov 13, 2018
The closure span includes everything between the pipes, the pipes and any prefix modifier. In the suggestion, we replace the entire span. We should probably add a new way of obtaining closure spans to account for this, to be used in suggestions. The fix itself will be fairly small.
Rollup merge of rust-lang#55980 - csmoe:issue-55891, r=estebank