Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Pretty-printing support for Rust generators #62572
Support printing Rust generators in a way that looks more like enums. Generators (as of #59897) are represented in Rust as variant layouts with some extra fields on the outer layout. These extra fields (which are upvars, captured from the environment of the generator closure) seem to cause printing to become less pretty.
Today printing a Rust generator from
Note that we print the fields of every single variant, even though the discriminant is marked in the DWARF output.
Here's the test which produced the above output. The above excerpt is from the second print in the test.
I also opened this bug on GDB; I'm not sure how much we upstream pretty printing support today.