Fix rebase and clippy tests
This commit is contained in:
parent
8888d0d61e
commit
b825b0fe63
21 changed files with 136 additions and 184 deletions
|
@ -421,11 +421,14 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
|
|||
// Mark this expr's scope and all parent scopes as containing `yield`.
|
||||
let mut scope = Scope { id: expr.hir_id.local_id, data: ScopeData::Node };
|
||||
loop {
|
||||
let data = YieldData {
|
||||
span: expr.span,
|
||||
expr_and_pat_count: visitor.expr_and_pat_count,
|
||||
source: *source,
|
||||
let span = match expr.kind {
|
||||
hir::ExprKind::Yield(expr, hir::YieldSource::Await { .. }) => {
|
||||
expr.span.shrink_to_hi().to(expr.span)
|
||||
}
|
||||
_ => expr.span,
|
||||
};
|
||||
let data =
|
||||
YieldData { span, expr_and_pat_count: visitor.expr_and_pat_count, source: *source };
|
||||
visitor.scope_tree.yield_in_scope.insert(scope, data);
|
||||
if visitor.pessimistic_yield {
|
||||
debug!("resolve_expr in pessimistic_yield - marking scope {:?} for fixup", scope);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue