We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://doc.rust-lang.org/book/closures.html#closures-and-their-environment
Right before the "move closures" section, the book doesn't really make it clear that this code would not compile:
let nums = vec![1, 2, 3]; let takes_nums = || nums; println!("{:?}", nums);
It shows part of the compile error, but it just looks like a non-error message from the compiler.
Consider appending "the error message" to "This gives us".
The text was updated successfully, but these errors were encountered:
Clarify that the following will error
1792ef6
Fixes rust-lang#26268
Auto merge of #26318 - steveklabnik:gh26268, r=alexcrichton
4806210
Fixes #26268
No branches or pull requests
https://doc.rust-lang.org/book/closures.html#closures-and-their-environment
Right before the "move closures" section, the book doesn't really make it clear that this code would not compile:
It shows part of the compile error, but it just looks like a non-error message from the compiler.
Consider appending "the error message" to "This gives us".
The text was updated successfully, but these errors were encountered: