Do not ICE on pattern that uses a binding multiple times in generator
This commit is contained in:
parent
a85e949276
commit
66ac5a2d63
1 changed files with 1 additions and 4 deletions
|
@ -250,10 +250,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
|
|||
let mut scope_var_ids =
|
||||
self.guard_bindings.pop().expect("should have pushed at least one earlier");
|
||||
for var_id in scope_var_ids.drain(..) {
|
||||
assert!(
|
||||
self.guard_bindings_set.remove(&var_id),
|
||||
"variable should be placed in scope earlier"
|
||||
);
|
||||
self.guard_bindings_set.remove(&var_id);
|
||||
}
|
||||
}
|
||||
self.visit_expr(body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue