Skip to content

Commit 076b0d0

Browse files
committed
more nits + typos
1 parent 9217909 commit 076b0d0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
598598
}
599599
}
600600

601-
// Now take member constraints into account.
601+
// Now take member constraints into account.
602602
let member_constraints = self.member_constraints.clone();
603603
for m_c_i in member_constraints.indices(scc_a) {
604604
self.apply_member_constraint(
@@ -1560,15 +1560,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
15601560
let choice_regions = member_constraints.choice_regions(m_c_i);
15611561
debug!("check_member_constraint: choice_regions={:?}", choice_regions);
15621562

1563-
// did the pick-region wind up equal to any of the option regions?
1563+
// Did the member region wind up equal to any of the option regions?
15641564
if let Some(o) = choice_regions.iter().find(|&&o_r| {
15651565
self.eval_equal(o_r, m_c.member_region_vid)
15661566
}) {
15671567
debug!("check_member_constraint: evaluated as equal to {:?}", o);
15681568
continue;
15691569
}
15701570

1571-
// if not, report an error
1571+
// If not, report an error.
15721572
let region_scope_tree = &infcx.tcx.region_scope_tree(mir_def_id);
15731573
let member_region = infcx.tcx.mk_region(ty::ReVar(member_region_vid));
15741574
opaque_types::unexpected_hidden_region_diagnostic(

src/librustc_mir/borrow_check/nll/type_check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,9 +2519,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
25192519
let closure_constraints = QueryRegionConstraints {
25202520
outlives: closure_region_requirements.apply_requirements(tcx, def_id, substs),
25212521

2522-
// Presently, closures never propagate pick
2522+
// Presently, closures never propagate member
25232523
// constraints to their parents -- they are enforced
2524-
// locally. This is largely a non-issue as pick
2524+
// locally. This is largely a non-issue as member
25252525
// constraints only come from `-> impl Trait` and
25262526
// friends which don't appear (thus far...) in
25272527
// closures.

src/libsyntax/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ declare_features! (
570570
// Allows explicit discriminants on non-unit enum variants.
571571
(active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None),
572572

573-
// Allows impl trait with multiple unrelated lifetimes
573+
// Allows `impl Trait` with multiple unrelated lifetimes.
574574
(active, member_constraints, "1.37.0", Some(61977), None),
575575

576576
// -------------------------------------------------------------------------

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-existential.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trait Trait<'a, 'b> { }
1010
impl<T> Trait<'_, '_> for T { }
1111

1212
// Here we wind up selecting `'a` and `'b` in the hidden type because
13-
// those are the types that appear inth e original values.
13+
// those are the types that appear in the original values.
1414

1515
existential type Foo<'a, 'b>: Trait<'a, 'b>;
1616

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trait Trait<'a, 'b> { }
99
impl<T> Trait<'_, '_> for T { }
1010

1111
// Here we wind up selecting `'a` and `'b` in the hidden type because
12-
// those are the types that appear inth e original values.
12+
// those are the types that appear in the original values.
1313

1414
fn upper_bounds<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
1515
// In this simple case, you have a hidden type `(&'0 u8, &'1 u8)` and constraints like

0 commit comments

Comments
 (0)