tweak comment

This commit is contained in:
Niko Matsakis 2018-07-06 06:33:38 -04:00 committed by GitHub
parent f247a3e490
commit 6d0644c65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -425,9 +425,10 @@ fn place_element_conflict<'a, 'gcx: 'tcx, 'tcx>(
offset: offset_from_begin, min_length: min_length2, from_end: false }) => {
// both patterns matched so it must be at least the greater of the two
let min_length = max(min_length1, min_length2);
// offset_from_end can be in range [1..min_length], -1 for last and min_length
// for first, min_length - offset_from_end gives minimal possible offset from
// the beginning
// `offset_from_end` can be in range `[1..min_length]`, 1 indicates the last
// element (like -1 in Python) and `min_length` the first.
// Therefore, `min_length - offset_from_end` gives the minimal possible
// offset from the beginning
if *offset_from_begin >= min_length - offset_from_end {
debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX-FE");
Overlap::EqualOrDisjoint