Skip to content

debuginfo: "lexical-scope-in-for-loop" auto-test fails #19732

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

Closed
michaelwoerister opened this issue Dec 11, 2014 · 1 comment · Fixed by #20027 or #20167
Closed

debuginfo: "lexical-scope-in-for-loop" auto-test fails #19732

michaelwoerister opened this issue Dec 11, 2014 · 1 comment · Fixed by #20027 or #20167
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@michaelwoerister
Copy link
Member

It seems that no debuginfo is created for the loop variable anymore.

@michaelwoerister michaelwoerister added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Dec 11, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue Dec 21, 2014
Back when for-loop iteration variables were just de-sugared into `let` bindings, debuginfo for them was created like for any other `let` binding. When the implementation approach for for-loops changed, we ceased having debuginfo for the iteration variable. This PR fixes this omission and adds a more prominent test case for it.

Also contains some minor, general cleanup of the debuginfo module.

Fixes rust-lang#19732
@alexcrichton
Copy link
Member

PR was reverted due to #20127, so reopening.

@alexcrichton alexcrichton reopened this Dec 23, 2014
bors added a commit that referenced this issue Dec 25, 2014
…hton

... really this time `:)`

I went for the simpler fix after all since it turned out to become a bit too complicated to extract the current iteration value from its containing `Option` with the different memory layouts it can have. It's also what we already do for match bindings.

I also extended the new test case to include the "simple identifier" case.

Fixes #20127, fixes #19732
lnicola pushed a commit to lnicola/rust that referenced this issue May 5, 2025
fix: Correct assoc ty bound var starting index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
2 participants