-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Explain E0434 #33229
Explain E0434 #33229
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
||
|
||
```compile_fail | ||
fn foo(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a blank space between foo()
and {
.
Like I already said to you, improve a bit more your explanation. For example: what's happening? Why can't we capture a variable into a sub function? The goal is to help users to have a better understanding of what's wrong in their code. Otherwise, thanks for your PR! :) |
E0434: r##" | ||
This error indicates that a variable usage inside an inner function is invalid | ||
because the variable comes from a dynamic environment. Inner functions do not | ||
have access to their containing environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either you put "Example of erroneous code:" directly after the text, or you separate it from the first block (and then add an empty line between the two to make the separation obvious).
Oh and please leave a comment on github when you update your PR please (github doesn't notify when a PR is updated). |
I think that I've implemented the requested adjustments. |
Great job! Can you squash your commits please? |
That was my first time squashing commits, but I think it is done. |
Indeed! Thanks for your work! r=me @steveklabnik |
Looks good, thanks! @bors: r=guillaumegomez |
📌 Commit 0cfb5a0 has been approved by |
@bors: rollup |
💔 Test failed - auto-win-gnu-64-opt |
@bors: retry cc @michaelwoerister looks like a similar failure you pointed out on another PR recently? |
#32777