]> git.lizzy.rs Git - rust.git/commitdiff
Wording
authorNadrieril <nadrieril@gmail.com>
Mon, 23 Sep 2019 17:09:30 +0000 (19:09 +0200)
committerNadrieril <nadrieril+git@gmail.com>
Fri, 1 Nov 2019 17:23:03 +0000 (17:23 +0000)
src/librustc_mir/hair/pattern/_match.rs

index 8dace0bab7d63f3b868b7cc6e96f3725e48ffd54..2e46cb9f8c915dd6e351e60cdf1e7dd83bb7e589 100644 (file)
@@ -1509,7 +1509,7 @@ pub fn is_useful<'p, 'a, 'tcx>(
                     // 1) If the user is matching against a non-exhaustive
                     // enum, there is no point in enumerating all possible
                     // variants, because the user can't actually match
                     // 1) If the user is matching against a non-exhaustive
                     // enum, there is no point in enumerating all possible
                     // variants, because the user can't actually match
-                    // against them himself, e.g., in an example like:
+                    // against them themselves, e.g., in an example like:
                     // ```
                     //     let err: io::ErrorKind = ...;
                     //     match err {
                     // ```
                     //     let err: io::ErrorKind = ...;
                     //     match err {
@@ -1885,9 +1885,9 @@ fn range_borders(r: IntRange<'_>) -> impl Iterator<Item = Border> {
 
                 lint_overlapping_patterns(tcx, hir_id, ctor_range, ty, overlaps);
 
 
                 lint_overlapping_patterns(tcx, hir_id, ctor_range, ty, overlaps);
 
-                // We're going to iterate through every pair of borders, making sure that each
-                // represents an interval of nonnegative length, and convert each such interval
-                // into a constructor.
+                // We're going to iterate through every adjacent pair of borders, making sure that
+                // each represents an interval of nonnegative length, and convert each such
+                // interval into a constructor.
                 for IntRange { range, .. } in
                     borders.windows(2).filter_map(|window| match (window[0], window[1]) {
                         (Border::JustBefore(n), Border::JustBefore(m)) => {
                 for IntRange { range, .. } in
                     borders.windows(2).filter_map(|window| match (window[0], window[1]) {
                         (Border::JustBefore(n), Border::JustBefore(m)) => {