Skip to content

remove box_patterns#156749

Open
cyrgani wants to merge 2 commits into
rust-lang:mainfrom
cyrgani:unbox-full
Open

remove box_patterns#156749
cyrgani wants to merge 2 commits into
rust-lang:mainfrom
cyrgani:unbox-full

Conversation

@cyrgani
Copy link
Copy Markdown
Contributor

@cyrgani cyrgani commented May 19, 2026

This PR removes the old feature box_patterns, tracked in #29641. As explained in #29641 (comment), this feature will not be stabilized since deref_patterns (#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see #154045 for more details). Therefore, this needs a crater run.

Currently blocked on rust-lang/rust-clippy#17008.
Closes #29641.
Closes #105099.
Closes #156110.

@cyrgani cyrgani added S-blocked Status: Blocked on something else such as an RFC or other implementation work. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. I-lang-nominated Nominated for discussion during a lang team meeting. needs-crater This change needs a crater run to check for possible breakage in the ecosystem. labels May 19, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 19, 2026

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

The Rustfmt subtree was changed

cc @rust-lang/rustfmt

The Clippy subtree was changed

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels May 19, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 19, 2026

r? @Kivooeo

rustbot has assigned @Kivooeo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 20 candidates

@cyrgani cyrgani changed the title remove box_patterrns remove box_patterns May 19, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job pr-check-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:160:24
    |
160 |               MethodCall(box ast::MethodCall {
    |  ________________________^
161 | |                 seg: ls,
162 | |                 receiver: lr,
163 | |                 args: la,
164 | |                 ..
165 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:166:24
    |
166 |               MethodCall(box ast::MethodCall {
    |  ________________________^
167 | |                 seg: rs,
168 | |                 receiver: rr,
169 | |                 args: ra,
170 | |                 ..
171 | |             }),
    | |_____________^

error: `box_patterns` have been removed
---
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:389:16
    |
389 |               Fn(box ast::Fn {
    |  ________________^
390 | |                 defaultness: rd,
391 | |                 sig: rf,
392 | |                 ident: ri,
...   |
397 | |                 eii_impls: _,
398 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:423:21
    |
423 |               TyAlias(box ast::TyAlias {
    |  _____________________^
424 | |                 defaultness: ld,
425 | |                 generics: lg,
426 | |                 bounds: lb,
427 | |                 ty: lt,
428 | |                 ..
429 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:430:21
    |
430 |               TyAlias(box ast::TyAlias {
    |  _____________________^
431 | |                 defaultness: rd,
432 | |                 generics: rg,
433 | |                 bounds: rb,
434 | |                 ty: rt,
---
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:460:19
    |
460 |               Trait(box ast::Trait {
    |  ___________________^
461 | |                 impl_restriction: riprt,
462 | |                 constness: rc,
463 | |                 is_auto: ra,
...   |
468 | |                 items: ris,
469 | |             }),
    | |_____________^

---
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:568:16
    |
568 |               Fn(box ast::Fn {
    |  ________________^
569 | |                 defaultness: rd,
570 | |                 sig: rf,
571 | |                 ident: ri,
...   |
576 | |                 eii_impls: _,
577 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:587:21
    |
587 |               TyAlias(box ast::TyAlias {
    |  _____________________^
588 | |                 defaultness: ld,
589 | |                 ident: li,
590 | |                 generics: lg,
...   |
593 | |                 ty: lt,
594 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:595:21
    |
595 |               TyAlias(box ast::TyAlias {
    |  _____________________^
596 | |                 defaultness: rd,
597 | |                 ident: ri,
598 | |                 generics: rg,
...   |
---
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:654:16
    |
654 |               Fn(box ast::Fn {
    |  ________________^
655 | |                 defaultness: rd,
656 | |                 sig: rf,
657 | |                 ident: ri,
...   |
662 | |                 eii_impls: _,
663 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:673:18
    |
673 |               Type(box TyAlias {
    |  __________________^
674 | |                 defaultness: ld,
675 | |                 ident: li,
676 | |                 generics: lg,
...   |
679 | |                 ty: lt,
680 | |             }),
    | |_____________^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:681:18
    |
681 |               Type(box TyAlias {
    |  __________________^
682 | |                 defaultness: rd,
683 | |                 ident: ri,
684 | |                 generics: rg,
...   |
---
    Checking toml_edit v0.19.15
error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/mir/mod.rs:186:42
    |
186 |             if let StatementKind::Assign(box (place, _)) = statement.kind {
    |                                          ^^^^^^^^^^^^^^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs:160:21
    |
160 |         BinaryOp(_, box (lhs, rhs)) => {
    |                     ^^^^^^^^^^^^^^

[RUSTC-TIMING] zerovec test:false 1.008
    Checking tinystr v0.8.3
error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:193:29
    |
193 |         Rvalue::BinaryOp(_, box (lhs, rhs)) => {
    |                             ^^^^^^^^^^^^^^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:232:31
    |
232 |         StatementKind::Assign(box (place, rval)) => {
    |                               ^^^^^^^^^^^^^^^^^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:237:33
    |
237 |         StatementKind::FakeRead(box (_, place)) => check_place(cx, *place, span, body, msrv),
    |                                 ^^^^^^^^^^^^^^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:241:34
    |
241 |         StatementKind::Intrinsic(box NonDivergingIntrinsic::Assume(op)) => check_operand(cx, op, span, body, msrv),
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `box_patterns` have been removed
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:243:34
    |
243 |           StatementKind::Intrinsic(box NonDivergingIntrinsic::CopyNonOverlapping(
    |  __________________________________^
244 | |             rustc_middle::mir::CopyNonOverlapping { dst, src, count },
245 | |         )) => {
    | |_________^

---
   Compiling thiserror-impl v1.0.69
error[E0425]: cannot find value `ls` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:26
    |
172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |                          ^^
    |
help: a local variable with a similar name exists
    |
172 -         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
172 +         ) => eq_path_seg(l, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |

error[E0425]: cannot find value `rs` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:30
    |
172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |                              ^^
    |
help: a local variable with a similar name exists
    |
172 -         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
172 +         ) => eq_path_seg(ls, r) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |

error[E0425]: cannot find value `lr` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:45
    |
172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |                                             ^^
    |
help: a local variable with a similar name exists
    |
172 -         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
172 +         ) => eq_path_seg(ls, rs) && eq_expr(l, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |
help: consider importing one of these constants
    |
  7 + use crate::sym::lr;
    |
  7 + use rustc_span::sym::lr;
    |

error[E0425]: cannot find value `rr` in this scope
    --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:49
     |
 172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
     |                                                 ^^
     |
    ::: compiler/rustc_ast/src/ast.rs:1920:5
     |
1920 |     Err(ErrorGuaranteed),
     |     --- similarly named tuple variant `Err` defined here
     |
help: a tuple variant with a similar name exists
     |
 172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, Err) && over(la, ra, |l, r| eq_expr(l, r)),
     |                                                 +

error[E0425]: cannot find value `la` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:61
    |
172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |                                                             ^^
    |
help: a local variable with a similar name exists
    |
172 -         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
172 +         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(l, ra, |l, r| eq_expr(l, r)),
    |

error[E0425]: cannot find value `ra` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:172:65
    |
172 |         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
    |                                                                 ^^
    |
help: a local variable with a similar name exists
    |
172 -         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, ra, |l, r| eq_expr(l, r)),
172 +         ) => eq_path_seg(ls, rs) && eq_expr(lr, rr) && over(la, r, |l, r| eq_expr(l, r)),
    |

error[E0425]: cannot find value `lb` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:235:31
    |
235 |             eq_closure_binder(lb, rb)
    |                               ^^
    |
help: a local variable with a similar name exists
    |
235 -             eq_closure_binder(lb, rb)
235 +             eq_closure_binder(l, rb)
    |

error[E0425]: cannot find value `rb` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:235:35
    |
235 |             eq_closure_binder(lb, rb)
    |                                   ^^
    |
help: a local variable with a similar name exists
    |
235 -             eq_closure_binder(lb, rb)
235 +             eq_closure_binder(lb, r)
    |

error[E0425]: cannot find value `lc` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:236:20
    |
236 |                 && lc == rc
    |                    ^^
    |
help: a local variable with a similar name exists
    |
236 -                 && lc == rc
236 +                 && l == rc
    |

error[E0425]: cannot find value `rc` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:236:26
    |
236 |                 && lc == rc
    |                          ^^
    |
help: a local variable with a similar name exists
    |
236 -                 && lc == rc
236 +                 && lc == r
    |

error[E0425]: cannot find value `la` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:237:39
    |
237 |                 && eq_coroutine_kind(*la, *ra)
    |                                       ^^
    |
help: a local variable with a similar name exists
    |
237 -                 && eq_coroutine_kind(*la, *ra)
237 +                 && eq_coroutine_kind(*l, *ra)
    |

error[E0425]: cannot find value `ra` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:237:44
    |
237 |                 && eq_coroutine_kind(*la, *ra)
    |                                            ^^
    |
help: a local variable with a similar name exists
    |
237 -                 && eq_coroutine_kind(*la, *ra)
237 +                 && eq_coroutine_kind(*la, *r)
    |

error[E0425]: cannot find value `lm` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:238:20
    |
238 |                 && lm == rm
    |                    ^^
    |
help: a local variable with a similar name exists
    |
238 -                 && lm == rm
238 +                 && l == rm
    |

error[E0425]: cannot find value `rm` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:238:26
    |
238 |                 && lm == rm
    |                          ^^
    |
help: a local variable with a similar name exists
    |
238 -                 && lm == rm
238 +                 && lm == r
    |

error[E0425]: cannot find value `lf` in this scope
    --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:239:31
     |
 239 |                 && eq_fn_decl(lf, rf)
     |                               ^^
     |
    ::: compiler/rustc_ast/src/ast.rs:1781:5
     |
1781 |     If(Box<Expr>, Box<Block>, Option<Box<Expr>>),
     |     -- similarly named tuple variant `If` defined here
     |
help: a tuple variant with a similar name exists
     |
 239 -                 && eq_fn_decl(lf, rf)
 239 +                 && eq_fn_decl(If, rf)
     |

error[E0425]: cannot find value `rf` in this scope
    --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:239:35
     |
 239 |                 && eq_fn_decl(lf, rf)
     |                                   ^^
     |
    ::: compiler/rustc_ast/src/ast.rs:1781:5
     |
1781 |     If(Box<Expr>, Box<Block>, Option<Box<Expr>>),
     |     -- similarly named tuple variant `If` defined here
     |
help: a tuple variant with a similar name exists
     |
 239 -                 && eq_fn_decl(lf, rf)
 239 +                 && eq_fn_decl(lf, If)
     |

error[E0425]: cannot find value `le` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:240:28
    |
240 |                 && eq_expr(le, re)
    |                            ^^
    |
help: a local variable with a similar name exists
    |
240 -                 && eq_expr(le, re)
240 +                 && eq_expr(l, re)
    |
help: consider importing one of these constants
    |
  7 + use crate::sym::le;
    |
  7 + use rustc_span::sym::le;
    |

error[E0425]: cannot find value `re` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:240:32
    |
240 |                 && eq_expr(le, re)
    |                                ^^
    |
help: a local variable with a similar name exists
    |
240 -                 && eq_expr(le, re)
240 +                 && eq_expr(le, r)
    |

error[E0425]: cannot find value `li` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:21
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                     ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*l, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `ri` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:26
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                          ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *r) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `lm` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:33
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                 ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && l == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `rm` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:39
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                       ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == r && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `ls` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:45
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                             ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && l == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `rs` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:51
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                                   ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && ls == r && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `lt` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:63
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                                               ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(l, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |
help: consider importing one of these constants
    |
  7 + use crate::sym::lt;
    |
  7 + use rustc_span::sym::lt;
    |

error[E0425]: cannot find value `rt` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:67
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                                                   ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, r) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |

error[E0425]: cannot find value `le` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:86
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                                                                      ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(l.as_deref(), re.as_deref()),
    |
help: consider importing one of these constants
    |
  7 + use crate::sym::le;
    |
  7 + use rustc_span::sym::le;
    |

error[E0425]: cannot find value `re` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:353:101
    |
353 |         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
    |                                                                                                     ^^
    |
help: a local variable with a similar name exists
    |
353 -         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
353 +         ) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), r.as_deref()),
    |

error[E0425]: cannot find value `ld` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:372:29
    |
372 |             eq_defaultness(*ld, *rd)
    |                             ^^
    |
help: a local variable with a similar name exists
    |
372 -             eq_defaultness(*ld, *rd)
372 +             eq_defaultness(*l, *rd)
    |

error[E0425]: cannot find value `rd` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:372:34
    |
372 |             eq_defaultness(*ld, *rd)
    |                                  ^^
    |
help: a local variable with a similar name exists
    |
372 -             eq_defaultness(*ld, *rd)
372 +             eq_defaultness(*ld, *r)
    |

error[E0425]: cannot find value `li` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:373:27
    |
373 |                 && eq_id(*li, *ri)
    |                           ^^
    |
help: a local variable with a similar name exists
    |
373 -                 && eq_id(*li, *ri)
373 +                 && eq_id(*l, *ri)
    |

error[E0425]: cannot find value `ri` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:373:32
    |
373 |                 && eq_id(*li, *ri)
    |                                ^^
    |
help: a local variable with a similar name exists
    |
373 -                 && eq_id(*li, *ri)
373 +                 && eq_id(*li, *r)
    |

error[E0425]: cannot find value `lg` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:374:32
    |
374 |                 && eq_generics(lg, rg)
    |                                ^^
    |
help: a local variable with a similar name exists
    |
374 -                 && eq_generics(lg, rg)
374 +                 && eq_generics(l, rg)
    |

error[E0425]: cannot find value `rg` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:374:36
    |
374 |                 && eq_generics(lg, rg)
    |                                    ^^
    |
help: a local variable with a similar name exists
    |
374 -                 && eq_generics(lg, rg)
374 +                 && eq_generics(lg, r)
    |

[RUSTC-TIMING] icu_locale_core test:false 1.683
error[E0425]: cannot find value `lt` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:375:26
    |
375 |                 && eq_ty(lt, rt)
    |                          ^^
    |
help: a local variable with a similar name exists
    |
375 -                 && eq_ty(lt, rt)
375 +                 && eq_ty(l, rt)
    |
help: consider importing one of these constants
    |
  7 + use crate::sym::lt;
    |
  7 + use rustc_span::sym::lt;
    |

error[E0425]: cannot find value `rt` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:375:30
    |
375 |                 && eq_ty(lt, rt)
    |                              ^^
    |
help: a local variable with a similar name exists
    |
375 -                 && eq_ty(lt, rt)
375 +                 && eq_ty(lt, r)
    |

    Checking icu_provider v2.2.0
error[E0425]: cannot find value `lb` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:376:30
    |
376 |                 && both(Some(lb), Some(rb), eq_const_item_rhs)
    |                              ^^
    |
help: a local variable with a similar name exists
    |
376 -                 && both(Some(lb), Some(rb), eq_const_item_rhs)
376 +                 && both(Some(l), Some(rb), eq_const_item_rhs)
    |

error[E0425]: cannot find value `rb` in this scope
   --> src/tools/clippy/clippy_utils/src/ast_utils/mod.rs:376:40
    |
376 |                 && both(Some(lb), Some(rb), eq_const_item_rhs)
    |                                        ^^
    |
help: a local variable with a similar name exists
    |
376 -                 && both(Some(lb), Some(rb), eq_const_item_rhs)
---

error[E0425]: cannot find value `lhs` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:194:31
    |
194 |             check_operand(cx, lhs, span, body, msrv)?;
    |                               ^^^ not found in this scope
    |
help: consider importing one of these constants
    |
  6 + use crate::sym::lhs;
    |
  6 + use rustc_span::sym::lhs;
    |

error[E0425]: cannot find value `rhs` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:195:31
    |
195 |             check_operand(cx, rhs, span, body, msrv)?;
    |                               ^^^ not found in this scope

error[E0425]: cannot find value `lhs` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:196:22
    |
196 |             let ty = lhs.ty(body, cx.tcx);
    |                      ^^^ not found in this scope
    |
help: consider importing one of these constants
    |
  6 + use crate::sym::lhs;
    |
  6 + use rustc_span::sym::lhs;
    |

error[E0425]: cannot find value `place` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:233:30
    |
233 |             check_place(cx, *place, span, body, msrv)?;
    |                              ^^^^^ not found in this scope

error[E0425]: cannot find value `rval` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:234:44
    |
234 |             check_rvalue(cx, body, def_id, rval, span, msrv)
    |                                            ^^^^ not found in this scope

error[E0425]: cannot find value `place` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:237:69
    |
237 |         StatementKind::FakeRead(box (_, place)) => check_place(cx, *place, span, body, msrv),
    |                                                                     ^^^^^ not found in this scope

error[E0425]: cannot find value `op` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:241:94
    |
241 |         StatementKind::Intrinsic(box NonDivergingIntrinsic::Assume(op)) => check_operand(cx, op, span, body, msrv),
    |                                                                                              ^^ not found in this scope

error[E0425]: cannot find value `dst` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:246:31
    |
246 |             check_operand(cx, dst, span, body, msrv)?;
    |                               ^^^ not found in this scope

error[E0425]: cannot find value `src` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:247:31
    |
247 |             check_operand(cx, src, span, body, msrv)?;
    |                               ^^^ not found in this scope

error[E0425]: cannot find value `count` in this scope
   --> src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs:248:31
    |
248 |             check_operand(cx, count, span, body, msrv)
    |                               ^^^^^ not found in this scope
    |
help: consider importing one of these constants
    |
  6 + use crate::sym::count;

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented May 19, 2026

Therefore, this needs a crater run

Which one? would check-only be sufficient for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-lang-nominated Nominated for discussion during a lang team meeting. needs-crater This change needs a crater run to check for possible breakage in the ecosystem. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

4 participants