rust/compiler/rustc_next_trait_solver
bors 2850ca8295 Auto merge of #150859 - nnethercote:opt-Canonicalizer-flag-checks, r=lcnr
Optimize canonicalizer flag checks.

The most important change here relates to type folding: we now check the flags up front, instead of doing it in `inner_fold_ty` after checking the cache and doing a match. This is a small perf win, and matches other similar folders (e.g. `CanonicalInstantiator`).

Likewise for const folding, we now check the flags first. (There is no cache for const folding.)

Elsewhere we don't check flags before folding a predicate (unnecessary, because `fold_predicate` already checks the flags itself before doing anything else), and invert the flag checks in a couple of methods to match the standard order.

r? @lcnr
2026-01-13 17:36:45 +00:00
..
src Auto merge of #150859 - nnethercote:opt-Canonicalizer-flag-checks, r=lcnr 2026-01-13 17:36:45 +00:00
Cargo.toml Revert introduction of [workspace.dependencies]. 2025-09-02 19:12:54 +10:00