summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
AgeCommit message (Collapse)AuthorLines
2025-06-16trait_sel: extend fast path with sized hierarchyDavid Wood-2/+9
Extend the fast path for `Sized` traits to include constness and `MetaSized`.
2025-06-09Apply nested goals certainty to InspectGoals for normalizes-toMichael Goulet-35/+64
2025-06-08Auto merge of #142088 - compiler-errors:perf-universal-stall, r=lcnrbors-2/+4
Filter out universals and lifetimes from `stalled_vars` lol r? lcnr
2025-06-07Rollup merge of #142126 - compiler-errors:normalize-uv-via-relate, r=BoxyUwUGuillaume Gomez-70/+26
Treat normalizing consts like normalizing types in deeply normalize ...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead. Fixes rust-lang/rust#140571 r? lcnr
2025-06-07Auto merge of #141927 - compiler-errors:perf-select, r=lcnrbors-41/+70
Clear nested candidates in select if certainty is yes Proving these goals is redundant.
2025-06-07Unify normalization of terms in deeply normalizeMichael Goulet-67/+22
2025-06-06Treat normalizing consts like normalizing types in deeply normalizeMichael Goulet-23/+24
2025-06-06Filter out universals and lifetimes from stalled_varsMichael Goulet-2/+4
2025-06-05Only instantiate impl argsMichael Goulet-46/+70
2025-06-05Clear nested candidates in select if certainty is yesMichael Goulet-1/+6
2025-06-02Fast path for subtype and coercion goalsMichael Goulet-0/+11
2025-06-02Fast path for stalled obligations on self tyMichael Goulet-0/+10
2025-05-29Tweak fast path trait handlingMichael Goulet-23/+44
2025-05-29Auto merge of #141581 - lcnr:fold-clauses, r=compiler-errorsbors-5/+4
add additional `TypeFlags` fast paths Some crates, e.g. `diesel`, have items with a lot of where-clauses (more than 150). In these cases checking the `TypeFlags` of the whole `param_env` can be very beneficial. This adds `fn fold_clauses` to mirror the existing `fn visit_clauses` and then uses this in folders which fold `ParamEnv`s. Split out from rust-lang/rust#141451, depends on rust-lang/rust#141442. r? `@compiler-errors`
2025-05-27Rename unpack to kindMichael Goulet-2/+2
2025-05-26Auto merge of #141605 - jieyouxu:rollup-3gjqh5l, r=jieyouxubors-1/+1
Rollup of 10 pull requests Successful merges: - rust-lang/rust#140898 (minor improvements on running miri) - rust-lang/rust#141392 (Avoid obligation construction dance with query region constraints) - rust-lang/rust#141431 (Emit dummy open drop for unsafe binder) - rust-lang/rust#141433 (Properly analyze captures from unsafe binders) - rust-lang/rust#141439 (Deduplicate dyn compatibility violations due to coercion) - rust-lang/rust#141449 (further deduplicate ast visitor code) - rust-lang/rust#141513 (interpret: add allocation parameters to `AllocBytes`) - rust-lang/rust#141516 (speed up charsearcher for ascii chars) - rust-lang/rust#141526 (add a dedicated section for compiler environment variables in the unstable book) - rust-lang/rust#141550 (Fix `unused_braces` lint suggestion when encountering attributes) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-26add additional `TypeFlags` fast pathslcnr-5/+4
2025-05-26Don't rerun goals if none of its vars have changedMichael Goulet-54/+89
2025-05-26RenameMichael Goulet-1/+1
2025-05-26Avoid obligation construction dance with query region constraintsMichael Goulet-1/+1
2025-05-25Comment for not using select_in_new_trait_solverMichael Goulet-0/+1
2025-05-23yeet `CanonicalVarInfo`lcnr-3/+3
2025-05-22Auto merge of #141397 - matthiaskrgr:rollup-l9uu6g6, r=matthiaskrgrbors-2/+2
Rollup of 8 pull requests Successful merges: - #141355 (ci: improve citool job db errors) - #141359 (Fix `FnOnce` impl for `AsyncFn`/`AsyncFnMut` self-borrowing closures in new solver) - #141362 (Normalize aliases to correct kind of error term) - #141377 (Remove unnecessary `is_empty` checks) - #141381 (try_cast_aligned: avoid bare int-to-ptr casts) - #141382 (ci: convert distcheck to free runner) - #141389 (ci: prepare aws access keys for migration) - #141390 (Don't allow `poly_select` in new solver) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-22Don't allow poly_select in new solverMichael Goulet-2/+2
2025-05-18Fast path for sized predMichael Goulet-0/+16
2025-05-18Fast path for processing some obligations in the new solverMichael Goulet-3/+44
2025-05-08Rollup merge of #140711 - compiler-errors:combine-maybes, r=lcnrMatthias Krüger-2/+8
Do not discard constraints on overflow if there was candidate ambiguity Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/201. There's a pretty chunky justification in the test. r? lcnr
2025-05-07opaque_type_storage to InferCtxtLikelcnr-47/+0
2025-05-07Use MaybeCause::or to allow constraints from overflows if they are combined ↵Michael Goulet-2/+8
with ambiguity
2025-05-06support duplicates in the opaque_types_storagelcnr-5/+32
2025-05-02Use less rustc_type_ir in the compiler codebaseRomain Perier-3/+3
This commit does the following: - Replaces use of rustc_type_ir by rustc_middle in rustc_infer. - The DelayedMap type is exposed by rustc_middle so everything can be accessed through rustc_middle in a coherent manner. - API-layer traits, like InferCtxtLike, Interner or inherent::* must be accessed via rustc_type_ir, not rustc_middle::ty. For this reason these are not reexported by rustc_middle::ty. - Replaces use of ty::Interner by rustc_type_ir::Interner in rustc_trait_selection
2025-04-30Rollup merge of #140468 - BoxyUwU:normalization_confusings2, r=lcnrMatthias Krüger-25/+32
Minor tweaks to make some normalization (adjacent) code less confusing r? lcnr sorry for double ping lol
2025-04-30Use less rustc_type_ir in the compiler codebaseRomain Perier-7/+6
This commit does the following: - Replaces use of rustc_type_ir by rustc_middle - Removes the rustc_type_ir dependency - The DelayedSet type is exposed by rustc_middle so everything can be accessed through rustc_middle in a coherent manner.
2025-04-29confusingsBoxy-25/+32
2025-04-26Rollup merge of #140320 - lcnr:wf-use-term, r=compiler-errorsMatthias Krüger-9/+13
replace `GenericArg` with `Term` where applicable r? types
2025-04-26convert some `GenericArg` to `Term`lcnr-9/+13
2025-04-25Track per-obligation recursion depth only if there is inferenceMichael Goulet-8/+15
2025-04-23Auto merge of #138845 - compiler-errors:stall-generators, r=lcnrbors-43/+188
Properly stall coroutine witnesses in new solver TODO: write description r? lcnr
2025-04-23MoreMichael Goulet-30/+59
2025-04-22Properly drain pending obligations for coroutinesMichael Goulet-36/+120
2025-04-22Collect and resolve ambiguous obligations from normalizing in writebackMichael Goulet-2/+34
2025-04-22Use `is_lang_item` and `as_lang_item` instead of handrolling their logicOli Scherer-3/+3
2025-04-16Fix replacing supertrait aliases in ReplaceProjectionWithMichael Goulet-4/+6
2025-04-10Deeply normalize obligations in BestObligationMichael Goulet-18/+33
2025-04-10SimplifyMichael Goulet-30/+22
2025-04-09Report higher-ranked trait error when higher-ranked projection goal fails in ↵Michael Goulet-3/+33
new solver
2025-04-03add `TypingMode::Borrowck`lcnr-0/+1
2025-04-01simplify Interner opaque types APIlcnr-18/+9
2025-03-23Obligation::as_goalMichael Goulet-7/+7
2025-03-15Fold visit into tyMichael Goulet-2/+1