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

debuginfo: Proper handling of lexical scopes and variable shadowing. #8329

Closed

Conversation

michaelwoerister
Copy link
Member

This pull request re-implements handling of visibility scopes and source code positions in debug info. It should now be very stable and properly handle

  • variable shadowing
  • expanded code (macros and the new for-loop de-sugaring, for example)
  • variables in the middle of nested scopes
  • bindings declared in the head of match statement arms.

all of which did not work at all or did not work reliably before. Those interested in a more detailed description of the problems at hand, I kindly refer to http://michaelwoerister.github.io/2013/08/03/visibility-scopes.html

Why doesn't the populate_scope_map() function use syntax::visit?
Because it would not improve this particular AST walker (see: michaelwoerister@69dc790#commitcomment-3781426)

Cheers,
Michael

@michaelwoerister
Copy link
Member Author

This has just been rebased.

bors added a commit that referenced this pull request Aug 13, 2013
…ydon

This pull request re-implements handling of visibility scopes and source code positions in debug info. It should now be very stable and properly handle

+ variable shadowing
+ expanded code (macros and the new for-loop de-sugaring, for example)
+ variables in the middle of nested scopes
+ bindings declared in the head of match statement arms. 

all of which did not work at all or did not work reliably before. Those interested in a more detailed description of the problems at hand, I kindly refer to http://michaelwoerister.github.io/2013/08/03/visibility-scopes.html

Why doesn't the `populate_scope_map()` function use `syntax::visit`?
Because it would not improve this particular AST walker (see: michaelwoerister@69dc790#commitcomment-3781426)

Cheers,
Michael
@bors bors closed this Aug 14, 2013
@michaelwoerister michaelwoerister deleted the lexical_scopes_alt branch July 9, 2014 07:51
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 27, 2022
Don't suggest an empty variant name in `enum_variant_names`

changelog: false positive fix: [`enum_variant_names`]: No longer suggests an empty variant name

Fixes rust-lang#8324
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.

3 participants