Skip to content
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

Merged
merged 1 commit into from
Apr 30, 2016
Merged

Explain E0434 #33229

merged 1 commit into from
Apr 30, 2016

Conversation

timothy-mcroy
Copy link

@rust-highfive
Copy link
Collaborator

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(){
Copy link
Member

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 {.

@GuillaumeGomez
Copy link
Member

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! :)

@GuillaumeGomez GuillaumeGomez assigned steveklabnik and unassigned nrc Apr 27, 2016
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.
Copy link
Member

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).

@GuillaumeGomez
Copy link
Member

Oh and please leave a comment on github when you update your PR please (github doesn't notify when a PR is updated).

@timothy-mcroy
Copy link
Author

I think that I've implemented the requested adjustments.

@GuillaumeGomez
Copy link
Member

Great job! Can you squash your commits please?

@timothy-mcroy
Copy link
Author

That was my first time squashing commits, but I think it is done.

@GuillaumeGomez
Copy link
Member

Indeed! Thanks for your work!

r=me @steveklabnik

@steveklabnik
Copy link
Member

Looks good, thanks!

@bors: r=guillaumegomez

@bors
Copy link
Contributor

bors commented Apr 29, 2016

📌 Commit 0cfb5a0 has been approved by guillaumegomez

@steveklabnik
Copy link
Member

@bors: rollup

@bors
Copy link
Contributor

bors commented Apr 29, 2016

⌛ Testing commit 0cfb5a0 with merge 9b63263...

bors added a commit that referenced this pull request Apr 29, 2016
@bors
Copy link
Contributor

bors commented Apr 29, 2016

💔 Test failed - auto-win-gnu-64-opt

@alexcrichton
Copy link
Member

@bors: retry

cc @michaelwoerister looks like a similar failure you pointed out on another PR recently?

@bors bors merged commit 0cfb5a0 into rust-lang:master Apr 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants