apply various formatting nits

This commit is contained in:
Niko Matsakis 2020-01-18 05:47:28 -05:00
parent 6bc79c9cf3
commit 5e0197f13a
5 changed files with 15 additions and 15 deletions

View File

@ -83,7 +83,7 @@ pub enum RegionResolutionError<'tcx> {
),
/// Indicates a `'b: 'a` constraint where `'a` is in a universe that
/// cannot name the placeholder `'b`
/// cannot name the placeholder `'b`.
UpperBoundUniverseConflict(
RegionVid,
RegionVariableOrigin,
@ -449,7 +449,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
return true;
}
// If both a and b are free, consult the declared
// If both `a` and `b` are free, consult the declared
// relationships. Note that this can be more precise than the
// `lub` relationship defined below, since sometimes the "lub"
// is actually the `postdom_upper_bound` (see
@ -460,7 +460,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
}
// For other cases, leverage the LUB code to find the LUB and
// check if it is equal to b.
// check if it is equal to `b`.
self.lub_concrete_regions(a, b) == b
}
@ -491,7 +491,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
}
(&ReStatic, _) | (_, &ReStatic) => {
// nothing lives longer than static
// nothing lives longer than `'static`
self.tcx().lifetimes.re_static
}
@ -501,14 +501,14 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
| (r @ ReFree(_), &ReEmpty(_))
| (&ReEmpty(_), r @ ReScope(_))
| (r @ ReScope(_), &ReEmpty(_)) => {
// all empty regions are less than early-bound, free,
// and scope regions
// All empty regions are less than early-bound, free,
// and scope regions.
r
}
(&ReEmpty(a_ui), &ReEmpty(b_ui)) => {
// empty regions are ordered according to the universe
// they are associated with
// Empty regions are ordered according to the universe
// they are associated with.
let ui = a_ui.min(b_ui);
self.tcx().mk_region(ReEmpty(ui))
}

View File

@ -68,7 +68,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
// being tested is `'empty`.
VerifyBound::IsEmpty
} else {
// If we can find any other bound R such that `T: R`, then
// If we can find any other bound `R` such that `T: R`, then
// we don't need to check for `'empty`, because `R: 'empty`.
VerifyBound::AnyBound(any_bounds)
}

View File

@ -173,10 +173,10 @@ pub struct CommonTypes<'tcx> {
}
pub struct CommonLifetimes<'tcx> {
/// ReEmpty in the root universe
/// `ReEmpty` in the root universe.
pub re_root_empty: Region<'tcx>,
/// ReStatic
/// `ReStatic`
pub re_static: Region<'tcx>,
/// Erased region, used after type-checking

View File

@ -56,7 +56,7 @@ impl<'tcx> FreeRegionMap<'tcx> {
}
}
/// Check whether `r_a <= r_b` is found in the relation
/// Check whether `r_a <= r_b` is found in the relation.
fn check_relation(&self, r_a: Region<'tcx>, r_b: Region<'tcx>) -> bool {
r_a == r_b || self.relation.contains(&r_a, &r_b)
}

View File

@ -1415,9 +1415,9 @@ pub enum RegionKind {
/// Empty lifetime is for data that is never accessed. We tag the
/// empty lifetime with a universe -- the idea is that we don't
/// want `exists<'a> { forall<'b> { 'b: 'a } }` to be satisfiable.
/// Therefore, the `'empty` in a universe U is less than all
/// regions visible from U, but not less than regions not visible
/// from U.
/// Therefore, the `'empty` in a universe `U` is less than all
/// regions visible from `U`, but not less than regions not visible
/// from `U`.
ReEmpty(ty::UniverseIndex),
/// Erased region, used by trait selection, in MIR and during codegen.