This commit is contained in:
Ayaz Hafiz 2022-04-20 15:44:21 -04:00
parent 7c0c0ef02a
commit 627d73e4c0
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
3 changed files with 6 additions and 8 deletions

View File

@ -52,7 +52,7 @@ fn walk_def<V: Visitor>(visitor: &mut V, def: &Def) {
);
visitor.visit_expr(&loc_expr.value, loc_expr.region, *expr_var);
if let Some(annot) = &annotation {
visitor.visit_annotation(&annot);
visitor.visit_annotation(annot);
}
}
@ -117,10 +117,8 @@ fn walk_when_branch<V: Visitor>(visitor: &mut V, branch: &WhenBranch, expr_var:
}
}
fn walk_pattern<V: Visitor>(_visitor: &mut V, pat: &Pattern) {
match pat {
_ => todo!(),
}
fn walk_pattern<V: Visitor>(_visitor: &mut V, _pat: &Pattern) {
todo!()
}
trait Visitor: Sized {

View File

@ -1178,7 +1178,7 @@ fn constrain_when_branch_help(
// must introduce the headers from the pattern before constraining the guard
state
.constraints
.extend(state.delayed_is_open_constriants.drain(..));
.append(&mut state.delayed_is_open_constriants);
let state_constraints = constraints.and_constraint(state.constraints);
let inner = constraints.let_constraint([], [], [], guard_constraint, ret_constraint);
@ -1186,7 +1186,7 @@ fn constrain_when_branch_help(
} else {
state
.constraints
.extend(state.delayed_is_open_constriants.drain(..));
.append(&mut state.delayed_is_open_constriants);
let state_constraints = constraints.and_constraint(state.constraints);
(state_constraints, ret_constraint)
};

View File

@ -497,7 +497,7 @@ pub fn constrain_pattern(
state.constraints.push(tag_con);
state
.constraints
.extend(state.delayed_is_open_constriants.drain(..));
.append(&mut state.delayed_is_open_constriants);
}
UnwrappedOpaque {