introduce LateParamRegionKind

This commit is contained in:
lcnr 2024-12-06 14:46:28 +01:00
parent 3378a5e084
commit 085d931810
19 changed files with 157 additions and 59 deletions

View file

@ -2374,8 +2374,8 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> {
match *region {
ty::ReEarlyParam(ref data) => data.has_name(),
ty::ReLateParam(ty::LateParamRegion { kind, .. }) => kind.is_named(),
ty::ReBound(_, ty::BoundRegion { kind: br, .. })
| ty::ReLateParam(ty::LateParamRegion { bound_region: br, .. })
| ty::RePlaceholder(ty::Placeholder {
bound: ty::BoundRegion { kind: br, .. }, ..
}) => {
@ -2448,8 +2448,13 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
return Ok(());
}
}
ty::ReLateParam(ty::LateParamRegion { kind, .. }) => {
if let Some(name) = kind.get_name() {
p!(write("{}", name));
return Ok(());
}
}
ty::ReBound(_, ty::BoundRegion { kind: br, .. })
| ty::ReLateParam(ty::LateParamRegion { bound_region: br, .. })
| ty::RePlaceholder(ty::Placeholder {
bound: ty::BoundRegion { kind: br, .. }, ..
}) => {