1
Fork 0

stabilize shorter-tail-lifetimes

This commit is contained in:
Ding Xiang Fei 2024-10-21 04:47:02 +08:00
parent be01dabfef
commit 0689b2139f
No known key found for this signature in database
GPG key ID: 3CD748647EEF6359
18 changed files with 39 additions and 46 deletions

View file

@ -167,9 +167,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
}
}
if let Some(tail_expr) = blk.expr {
if visitor.tcx.features().shorter_tail_lifetimes()
&& blk.span.edition().at_least_rust_2024()
{
if blk.span.edition().at_least_rust_2024() {
visitor.terminating_scopes.insert(tail_expr.hir_id.local_id);
}
visitor.visit_expr(tail_expr);