Skip to content

Commit

Permalink
crater run, off the wheel chocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiangfei2009 authored and compiler-errors committed Aug 28, 2024
1 parent d165f93 commit cef7ece
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions compiler/rustc_lint/src/tail_expr_drop_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ impl<'tcx> LateLintPass<'tcx> for TailExprDropOrder {
_: Span,
def_id: rustc_span::def_id::LocalDefId,
) {
if cx.tcx.sess.at_least_rust_2024() && cx.tcx.features().shorter_tail_lifetimes {
Self::check_fn_or_closure(cx, fn_kind, body, def_id);
}
Self::check_fn_or_closure(cx, fn_kind, body, def_id);
}
}

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

impl<'tcx, 'a> LintVisitor<'tcx, 'a> {
fn check_block_inner(&mut self, block: &Block<'tcx>) {
if !block.span.at_least_rust_2024() {
// We only lint for Edition 2024 onwards
return;
}
let Some(tail_expr) = block.expr else { return };
for stmt in block.stmts {
match stmt.kind {
Expand Down

0 comments on commit cef7ece

Please sign in to comment.