]> git.lizzy.rs Git - rust.git/commitdiff
more nits + typos
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 24 Jun 2019 19:55:39 +0000 (15:55 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 2 Jul 2019 16:25:23 +0000 (12:25 -0400)
src/librustc_mir/borrow_check/nll/region_infer/mod.rs
src/librustc_mir/borrow_check/nll/type_check/mod.rs
src/libsyntax/feature_gate.rs
src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-existential.rs
src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs

index 89d0be3a10cef752bf2613ce2387ef0113ba8a80..4e609460c1f70aeb92ac635c032b79a7e23ae7f1 100644 (file)
@@ -598,7 +598,7 @@ fn propagate_constraint_sccs_new(
             }
         }
 
-        // Now take member constraints into account. 
+        // Now take member constraints into account.
         let member_constraints = self.member_constraints.clone();
         for m_c_i in member_constraints.indices(scc_a) {
             self.apply_member_constraint(
@@ -1560,7 +1560,7 @@ fn check_member_constraints(
             let choice_regions = member_constraints.choice_regions(m_c_i);
             debug!("check_member_constraint: choice_regions={:?}", choice_regions);
 
-            // did the pick-region wind up equal to any of the option regions?
+            // Did the member region wind up equal to any of the option regions?
             if let Some(o) = choice_regions.iter().find(|&&o_r| {
                 self.eval_equal(o_r, m_c.member_region_vid)
             }) {
@@ -1568,7 +1568,7 @@ fn check_member_constraints(
                 continue;
             }
 
-            // if not, report an error
+            // If not, report an error.
             let region_scope_tree = &infcx.tcx.region_scope_tree(mir_def_id);
             let member_region = infcx.tcx.mk_region(ty::ReVar(member_region_vid));
             opaque_types::unexpected_hidden_region_diagnostic(
index 2cdd1363cdf963f392d188f6c4fc0d8241c5b160..cdbbe1d02bd92edd54450409dd9ae907ef6b6a08 100644 (file)
@@ -2519,9 +2519,9 @@ fn prove_closure_bounds(
             let closure_constraints = QueryRegionConstraints {
                 outlives: closure_region_requirements.apply_requirements(tcx, def_id, substs),
 
-                // Presently, closures never propagate pick
+                // Presently, closures never propagate member
                 // constraints to their parents -- they are enforced
-                // locally.  This is largely a non-issue as pick
+                // locally.  This is largely a non-issue as member
                 // constraints only come from `-> impl Trait` and
                 // friends which don't appear (thus far...) in
                 // closures.
index 1223c069d6569cb76a0ccc8c9f520cc236e9c453..e6a09e7f873ea7d4f04c8a56ce484c412435e460 100644 (file)
@@ -570,7 +570,7 @@ pub fn walk_feature_fields<F>(&self, mut f: F)
     // Allows explicit discriminants on non-unit enum variants.
     (active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None),
 
-    // Allows impl trait with multiple unrelated lifetimes
+    // Allows `impl Trait` with multiple unrelated lifetimes.
     (active, member_constraints, "1.37.0", Some(61977), None),
 
     // -------------------------------------------------------------------------
index a1ec89e8fbd05cdc79593a4746d7c52c63d4b227..a103e21e047e5ec43696f6bb66f103df6f8f8b9d 100644 (file)
@@ -10,7 +10,7 @@ trait Trait<'a, 'b> { }
 impl<T> Trait<'_, '_> for T { }
 
 // Here we wind up selecting `'a` and `'b` in the hidden type because
-// those are the types that appear inth e original values.
+// those are the types that appear in the original values.
 
 existential type Foo<'a, 'b>: Trait<'a, 'b>;
 
index 21979b001797e9aa8b3a6e831642b8d19d0c3b8a..43f8bd71e4108c0ac0f9546f3fe2e225a17001c6 100644 (file)
@@ -9,7 +9,7 @@ trait Trait<'a, 'b> { }
 impl<T> Trait<'_, '_> for T { }
 
 // Here we wind up selecting `'a` and `'b` in the hidden type because
-// those are the types that appear inth e original values.
+// those are the types that appear in the original values.
 
 fn upper_bounds<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
     // In this simple case, you have a hidden type `(&'0 u8, &'1 u8)` and constraints like