1
Fork 0

Remove PatKind::Never

This commit is contained in:
Zalathar 2024-08-03 21:04:51 +10:00
parent ec1483bf2e
commit bfe88a3bd0
2 changed files with 1 additions and 4 deletions

View file

@ -904,7 +904,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
print::write_slice_like(&mut s, &prefix, has_dot_dot, &suffix).unwrap();
PatKind::Print(s)
}
Never if self.tcx.features().never_patterns => PatKind::Never,
Never if self.tcx.features().never_patterns => PatKind::Print("!".to_string()),
Never | Wildcard | NonExhaustive | Hidden | PrivateUninhabited => {
PatKind::Print("_".to_string())
}