Skip to content

Commit 7a1491c

Browse files
crater run, off the wheel chocks
1 parent f48062e commit 7a1491c

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

compiler/rustc_hir_analysis/src/check/region.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
168168
}
169169
}
170170
if let Some(tail_expr) = blk.expr {
171-
if visitor.tcx.features().shorter_tail_lifetimes
172-
&& blk.span.edition().at_least_rust_2024()
173-
{
174-
visitor.terminating_scopes.insert(tail_expr.hir_id.local_id);
175-
}
171+
visitor.terminating_scopes.insert(tail_expr.hir_id.local_id);
176172
visitor.visit_expr(tail_expr);
177173
}
178174
}

compiler/rustc_lint/src/tail_expr_drop_order.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ impl<'tcx> LateLintPass<'tcx> for TailExprDropOrder {
137137
_: Span,
138138
def_id: rustc_span::def_id::LocalDefId,
139139
) {
140-
if cx.tcx.sess.at_least_rust_2024() && cx.tcx.features().shorter_tail_lifetimes {
141-
Self::check_fn_or_closure(cx, fn_kind, body, def_id);
142-
}
140+
Self::check_fn_or_closure(cx, fn_kind, body, def_id);
143141
}
144142
}
145143

@@ -185,10 +183,6 @@ impl<'tcx, 'a> Visitor<'tcx> for LintVisitor<'tcx, 'a> {
185183

186184
impl<'tcx, 'a> LintVisitor<'tcx, 'a> {
187185
fn check_block_inner(&mut self, block: &Block<'tcx>) {
188-
if !block.span.at_least_rust_2024() {
189-
// We only lint for Edition 2024 onwards
190-
return;
191-
}
192186
let Some(tail_expr) = block.expr else { return };
193187
for stmt in block.stmts {
194188
match stmt.kind {

0 commit comments

Comments
 (0)