enclose else block in terminating scope
This commit is contained in:
parent
34f0c4502f
commit
635b57c2ed
2 changed files with 2 additions and 2 deletions
|
|
@ -144,6 +144,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
|
|||
// the sequence of visits agree with the order in the default
|
||||
// `hir::intravisit` visitor.
|
||||
mem::swap(&mut prev_cx, &mut visitor.cx);
|
||||
visitor.terminating_scopes.insert(els.hir_id.local_id);
|
||||
visitor.visit_block(els);
|
||||
// From now on, we continue normally.
|
||||
visitor.cx = prev_cx;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ LL | bar2(Rc::new(())).await
|
|||
| |
|
||||
| has type `Rc<()>` which is not `Send`
|
||||
LL | };
|
||||
LL | }
|
||||
| - `Rc::new(())` is later dropped here
|
||||
| - `Rc::new(())` is later dropped here
|
||||
note: required by a bound in `is_send`
|
||||
--> $DIR/async-await-let-else.rs:19:15
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue