Skip to content

Commit f2e4709

Browse files
committed
improve comments
1 parent e1c838d commit f2e4709

File tree

1 file changed

+3
-3
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-3
lines changed

src/librustc_typeck/check/pat.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1360,8 +1360,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13601360
let min = before.len() as u64 + after.len() as u64;
13611361
let (opt_slice_ty, expected) =
13621362
self.check_array_pat_len(span, element_ty, expected, slice, len, min);
1363-
// opt_slice_ty.is_none() => slice.is_none()
1364-
// Note, though, that opt_slice_ty could be Some(error_ty).
1363+
// `opt_slice_ty.is_none()` => `slice.is_none()`.
1364+
// Note, though, that opt_slice_ty could be `Some(error_ty)`.
13651365
assert!(opt_slice_ty.is_some() || slice.is_none());
13661366
(element_ty, opt_slice_ty, expected)
13671367
}
@@ -1394,7 +1394,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13941394
/// Type check the length of an array pattern.
13951395
///
13961396
/// Returns both the type of the variable length pattern (or `None`), and the potentially
1397-
/// inferred array type. We should only return `None` for the slice type if `slice.is_none()`.
1397+
/// inferred array type. We only return `None` for the slice type if `slice.is_none()`.
13981398
fn check_array_pat_len(
13991399
&self,
14001400
span: Span,

0 commit comments

Comments
 (0)