tweak comment
This commit is contained in:
parent
f247a3e490
commit
6d0644c65a
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue