Skip to content

Commit 5e0197f

Browse files
committed
apply various formatting nits
1 parent 6bc79c9 commit 5e0197f

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/librustc/infer/lexical_region_resolve/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub enum RegionResolutionError<'tcx> {
8383
),
8484

8585
/// Indicates a `'b: 'a` constraint where `'a` is in a universe that
86-
/// cannot name the placeholder `'b`
86+
/// cannot name the placeholder `'b`.
8787
UpperBoundUniverseConflict(
8888
RegionVid,
8989
RegionVariableOrigin,
@@ -449,7 +449,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
449449
return true;
450450
}
451451

452-
// If both a and b are free, consult the declared
452+
// If both `a` and `b` are free, consult the declared
453453
// relationships. Note that this can be more precise than the
454454
// `lub` relationship defined below, since sometimes the "lub"
455455
// is actually the `postdom_upper_bound` (see
@@ -460,7 +460,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
460460
}
461461

462462
// For other cases, leverage the LUB code to find the LUB and
463-
// check if it is equal to b.
463+
// check if it is equal to `b`.
464464
self.lub_concrete_regions(a, b) == b
465465
}
466466

@@ -491,7 +491,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
491491
}
492492

493493
(&ReStatic, _) | (_, &ReStatic) => {
494-
// nothing lives longer than static
494+
// nothing lives longer than `'static`
495495
self.tcx().lifetimes.re_static
496496
}
497497

@@ -501,14 +501,14 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
501501
| (r @ ReFree(_), &ReEmpty(_))
502502
| (&ReEmpty(_), r @ ReScope(_))
503503
| (r @ ReScope(_), &ReEmpty(_)) => {
504-
// all empty regions are less than early-bound, free,
505-
// and scope regions
504+
// All empty regions are less than early-bound, free,
505+
// and scope regions.
506506
r
507507
}
508508

509509
(&ReEmpty(a_ui), &ReEmpty(b_ui)) => {
510-
// empty regions are ordered according to the universe
511-
// they are associated with
510+
// Empty regions are ordered according to the universe
511+
// they are associated with.
512512
let ui = a_ui.min(b_ui);
513513
self.tcx().mk_region(ReEmpty(ui))
514514
}

src/librustc/infer/outlives/verify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
6868
// being tested is `'empty`.
6969
VerifyBound::IsEmpty
7070
} else {
71-
// If we can find any other bound R such that `T: R`, then
71+
// If we can find any other bound `R` such that `T: R`, then
7272
// we don't need to check for `'empty`, because `R: 'empty`.
7373
VerifyBound::AnyBound(any_bounds)
7474
}

src/librustc/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ pub struct CommonTypes<'tcx> {
173173
}
174174

175175
pub struct CommonLifetimes<'tcx> {
176-
/// ReEmpty in the root universe
176+
/// `ReEmpty` in the root universe.
177177
pub re_root_empty: Region<'tcx>,
178178

179-
/// ReStatic
179+
/// `ReStatic`
180180
pub re_static: Region<'tcx>,
181181

182182
/// Erased region, used after type-checking

src/librustc/ty/free_region_map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl<'tcx> FreeRegionMap<'tcx> {
5656
}
5757
}
5858

59-
/// Check whether `r_a <= r_b` is found in the relation
59+
/// Check whether `r_a <= r_b` is found in the relation.
6060
fn check_relation(&self, r_a: Region<'tcx>, r_b: Region<'tcx>) -> bool {
6161
r_a == r_b || self.relation.contains(&r_a, &r_b)
6262
}

src/librustc/ty/sty.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1415,9 +1415,9 @@ pub enum RegionKind {
14151415
/// Empty lifetime is for data that is never accessed. We tag the
14161416
/// empty lifetime with a universe -- the idea is that we don't
14171417
/// want `exists<'a> { forall<'b> { 'b: 'a } }` to be satisfiable.
1418-
/// Therefore, the `'empty` in a universe U is less than all
1419-
/// regions visible from U, but not less than regions not visible
1420-
/// from U.
1418+
/// Therefore, the `'empty` in a universe `U` is less than all
1419+
/// regions visible from `U`, but not less than regions not visible
1420+
/// from `U`.
14211421
ReEmpty(ty::UniverseIndex),
14221422

14231423
/// Erased region, used by trait selection, in MIR and during codegen.

0 commit comments

Comments
 (0)