-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unhelpful error when missing move
in nested closure
#95079
Comments
slightly more minimal: fn foo(s: &str) -> impl Sized + '_ {
move |()| s.chars().map(|c| format!("{}{}", c, s))
} |
@rustbot claim |
I came up with a solution of printing an extra line of
This is the output from the second testing code (
|
Refined the fix with a verbose suggestion of where to add
The output of the second test case is:
In addition, the fix will also add the suggestion for nested closure block like this test case:
The output of the above test case is:
|
…er-errors Fix rust-lang#95079 unhelpful error when missing move in nested closure Fix rust-lang#95079 by adding help for missing move in nested closure
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1cb8bf9552639abd2a8178105cd3f001
The current output is:
The actually needed fix here is the following, which should ideally be recommended
The text was updated successfully, but these errors were encountered: