s/loc_guard/loc_pattern

This commit is contained in:
Ayaz Hafiz 2023-05-24 13:11:30 -05:00
parent 2f7930dd0f
commit ee2a195525
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -512,13 +512,13 @@ pub fn constrain_pattern(
let expected =
constraints.push_pat_expected_type(PExpected::NoExpectation(pat_type_index));
let (guard_var, loc_guard) = typ;
let (guard_var, loc_pattern) = typ;
let elem_type = {
let guard_type = constraints.push_variable(*guard_var);
let expected_pat = constraints.push_pat_expected_type(PExpected::ForReason(
PReason::PatternGuard,
pat_type_index,
loc_guard.region,
loc_pattern.region,
));
state.constraints.push(constraints.pattern_presence(
@ -533,8 +533,8 @@ pub fn constrain_pattern(
types,
constraints,
env,
&loc_guard.value,
loc_guard.region,
&loc_pattern.value,
loc_pattern.region,
expected,
state,
);