review comments
This commit is contained in:
parent
30cf7a3f51
commit
ffaf2a5c27
2 changed files with 4 additions and 2 deletions
|
@ -928,7 +928,7 @@ fn infer_placeholder_type<'a>(
|
||||||
|
|
||||||
// Typeck doesn't expect erased regions to be returned from `type_of`.
|
// Typeck doesn't expect erased regions to be returned from `type_of`.
|
||||||
tcx.fold_regions(ty, |r, _| match *r {
|
tcx.fold_regions(ty, |r, _| match *r {
|
||||||
ty::ReErased | ty::ReError => tcx.lifetimes.re_static,
|
ty::ReErased => tcx.lifetimes.re_static,
|
||||||
_ => r,
|
_ => r,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,11 +211,13 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReStatic | ReError => {
|
ReStatic => {
|
||||||
// nothing lives longer than `'static`
|
// nothing lives longer than `'static`
|
||||||
Ok(self.tcx().lifetimes.re_static)
|
Ok(self.tcx().lifetimes.re_static)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReError => Ok(self.tcx().lifetimes.re_error),
|
||||||
|
|
||||||
ReEarlyBound(_) | ReFree(_) => {
|
ReEarlyBound(_) | ReFree(_) => {
|
||||||
// All empty regions are less than early-bound, free,
|
// All empty regions are less than early-bound, free,
|
||||||
// and scope regions.
|
// and scope regions.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue