Remove yields_in_scope from the scope tree.

This commit is contained in:
Camille GILLOT
2025-07-05 15:11:09 +00:00
parent fd9ca711a3
commit 39ee1b2d77
3 changed files with 37 additions and 263 deletions

View File

@@ -171,9 +171,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
this.diverge_from(block);
block = success;
// The `Box<T>` temporary created here is not a part of the HIR,
// and therefore is not considered during coroutine auto-trait
// determination. See the comment about `box` at `yield_in_scope`.
let result = this.local_decls.push(LocalDecl::new(expr.ty, expr_span));
this.cfg
.push(block, Statement::new(source_info, StatementKind::StorageLive(result)));