Fix Debug
impl for LateParamRegionKind
.
It uses `Br` prefixes which are inappropriate and appear to have been incorrectly copy/pasted from the `Debug` impl for `BoundRegionKind`.
This commit is contained in:
parent
4f0de4c81d
commit
fadf910517
2 changed files with 8 additions and 8 deletions
|
@ -86,15 +86,15 @@ impl fmt::Debug for ty::LateParamRegion {
|
|||
impl fmt::Debug for ty::LateParamRegionKind {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match *self {
|
||||
ty::LateParamRegionKind::Anon(idx) => write!(f, "BrAnon({idx})"),
|
||||
ty::LateParamRegionKind::Anon(idx) => write!(f, "LateAnon({idx})"),
|
||||
ty::LateParamRegionKind::Named(did, name) => {
|
||||
if did.is_crate_root() {
|
||||
write!(f, "BrNamed({name})")
|
||||
write!(f, "LateNamed({name})")
|
||||
} else {
|
||||
write!(f, "BrNamed({did:?}, {name})")
|
||||
write!(f, "LateNamed({did:?}, {name})")
|
||||
}
|
||||
}
|
||||
ty::LateParamRegionKind::ClosureEnv => write!(f, "BrEnv"),
|
||||
ty::LateParamRegionKind::ClosureEnv => write!(f, "LateEnv"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue