Module rustc_pattern_analysis::rustc::print
source Β· Expand description
Pattern analysis sometimes wants to print patterns as part of a user-visible diagnostic.
Historically it did so by creating a synthetic thir::Pat
and printing that, but doing so was making it hard to modify the THIR pattern
representation for other purposes.
So this module contains a forked copy of thir::Pat
that is used only
for diagnostics, and has been partly simplified to remove things that arenβt
needed for printing.
Structs§
- Field
Pat π
Enums§
- Enum
Info π
Functions§
- start_
or_ πcomma Returns a closure that will return""
when called the first time, and then return", "
when called any subsequent times. Useful for printing comma-separated lists. - write_
ref_ πlike - write_
slice_ πlike - write_
struct_ πlike