Identifiers introduced via if let
binding can't be debugged
#97799
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
Identifiers introduced via an
if let
binding can't be inspected in the debugger. For instance:Stopping the debugger on line 3 shows no variables in scope other than the function argument
o
. I tested this in both gdb and WinDbg.This appears to be because rustc generates incorrect scoping information for the call to
zzz
. Looking at the LLVM IR, I seeWhich puts the call to the
zzz
in a different scope than the onex
is in and thus it isn't visible.This reproduces on all current versions of Rust:
The text was updated successfully, but these errors were encountered: