You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name the upvars for closures and generators in debuginfo
Previously, debuggers print closures as something like
```
y::main::closure-0 (0x7fffffffdd34, 0x7fffffffdd30)
```
The two pointers are actually references to two upvars.
It is not very obvious, especially for beginners.
It's because upvars don't have names before, as they are
packed into a tuple. This commit names the upvars, so we
can expect to see something like
```
y::main::closure-0 {_upvar_ref_mut__b: 0x[...], _upvar_ref__a: 0x[...]}
```
0 commit comments