summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
AgeCommit message (Collapse)AuthorLines
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
2025-03-15Squash fold into tyMichael Goulet-2/+1
2025-03-05change definitely non-productive cycles to errorlcnr-1/+1
2025-03-01Rollup merge of #137776 - nnethercote:rustc_transmute-cleanups, r=jswrennMatthias Krüger-8/+4
Some `rustc_transmute` cleanups A number of small things that can be removed. r? ``@jswrenn``
2025-02-28normalizing where-clauses is also coinductive, add testslcnr-1/+4
2025-02-28Remove `allow(unused_variables)` for `rustc_transmute`.Nicholas Nethercote-8/+4
This was hiding some genuine sins, including unused arguments in numerous functions/methods (incl. trait methods), and some unnecessary computation.
2025-02-28Remove `rustc_transmute`'s dependence on `rustc_infer`.Nicholas Nethercote-1/+1
`TransmuteTypeEnv` only needs a `TyCtxt`, not an `InferCtxt`.
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-3/+1
2025-02-22Fix binding mode problemsMichael Goulet-1/+3
2025-02-19Make fewer crates depend on rustc_ast_irMichael Goulet-2/+1
2025-02-13adjust derive_errorlcnr-25/+103
2025-02-13normalizes-to rework rigid alias handlinglcnr-4/+1
2025-02-08Rustfmtbjorn3-19/+20
2025-02-05Pass spans around new solverMichael Goulet-12/+22
2025-02-05Remove span from delegateMichael Goulet-2/+0
2025-01-31Manually walk into WF obligations in BestObligation proof tree visitorMichael Goulet-56/+95
2025-01-31Move fulfillment error derivation into new moduleMichael Goulet-490/+505
2025-01-30introduce `ty::Value`Lukas Markeffsky-1/+1
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-01-22Don't pick `T: FnPtr` nested goalsBoxy-2/+21
2025-01-15Rollup merge of #135498 - compiler-errors:dyn-upcasting-completeness, r=lcnrGuillaume Gomez-0/+4
Prefer lower `TraitUpcasting` candidates in selection Fixes #135463. The underlying cause is this ambiguity, but it's more clear (and manifests as a coercion error, rather than a MIR validation error) when it's written the way I did in the UI test. Sorry this is cursed r? lcnr
2025-01-14Make sure we can produce ConstArgHasWrongType errors for valtree constsMichael Goulet-2/+3
2025-01-14Prefer lower TraitUpcasting candidatesMichael Goulet-0/+4
2025-01-06Rollup merge of #132345 - compiler-errors:fx-diag, r=lcnrJacob Pratt-4/+75
Improve diagnostics for `HostEffectPredicate` in the new solver Adds derived cause for host effect predicates. Some diagnostics regress, but that's connected to the fact that our predicate visitor doesn't play well with aliases just yet.
2025-01-06Rollup merge of #134771 - compiler-errors:const-arg-has-type-err, r=lcnrMatthias Krüger-1/+18
Report correct `SelectionError` for `ConstArgHasType` in new solver fulfill r? ``@BoxyUwU``
2025-01-06Recurse on GAT where clauses in fulfillment error proof tree visitorMichael Goulet-5/+9
2025-01-06Add derived causes for host effect predicatesMichael Goulet-3/+70
2025-01-03Also in the new solverMichael Goulet-3/+2