Skip to content

Commit 4d98531

Browse files
committed
Auto merge of rust-lang#129604 - dingxiangfei2009:lint-tail-expr-drop-order-crater-run, r=<try>
[DO NOT MERGE] crater run on the tail expression drop order lint This PR is intended for a crater run *for the lint tail-expr-drop-order*. This need another patch on `src/tools/cargo` which is still in progress.
2 parents ab869e0 + e694863 commit 4d98531

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)