Skip to content

Commit cef7ece

Browse files
dingxiangfei2009compiler-errors
authored andcommitted
crater run, off the wheel chocks
1 parent d165f93 commit cef7ece

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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)