summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/rustc
AgeCommit message (Collapse)AuthorLines
2024-08-11Remove `print::Pat` entirely, replacing it with `String`Zalathar-27/+7
2024-08-11Remove `PatKind::Never`Zalathar-3/+0
2024-08-11Remove `PatKind::Slice`Zalathar-14/+3
2024-08-11Remove `PatKind::Range`Zalathar-4/+0
2024-08-11Remove `PatKind::Constant`Zalathar-6/+1
2024-08-11Remove `PatKind::Ref`Zalathar-6/+2
2024-08-11Remove `PatKind::Box`Zalathar-5/+0
2024-08-11Remove `PatKind::StructLike`Zalathar-9/+1
2024-08-11Remove `PatKind::Wild`Zalathar-3/+0
2024-08-11Add `print::PatKind::Print`Zalathar-0/+3
This will allow for the gradual removal of all other variants.
2024-08-11Avoid matching on `PatKind::Wild` in `write_struct_like`Zalathar-4/+5
2024-08-07Use `TyCtxt::is_diagnostic_item`Zalathar-2/+2
2024-08-07Avoid using `ty::tls::with` in `write_struct_like`Zalathar-5/+6
2024-08-07Split out hoisting/printing of `box` patternsZalathar-1/+5
2024-08-07Replace an unnecessary slice pattern with `has_dot_dot: bool`Zalathar-11/+8
2024-08-07Remove an impossible case under `EnumInfo::NotEnum`Zalathar-7/+1
2024-08-07Unify `Variant` and `Leaf` into `print::PatKind::StructLike`Zalathar-13/+14
2024-08-07Break up `print::Pat` printing into several helper functionsZalathar-113/+142
2024-07-31Use a separate pattern type for `rustc_pattern_analysis` diagnosticsZalathar-0/+193
The pattern-analysis code needs to print patterns, as part of its user-visible diagnostics. But it never actually tries to print "real" patterns! Instead, it only ever prints synthetic patterns that it has reconstructed from its own internal represenations. We can therefore simultaneously remove two obstacles to changing `thir::Pat`, by having the pattern-analysis code use its own dedicated type for building printable patterns, and then making `thir::Pat` not printable at all.