about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
AgeCommit message (Collapse)AuthorLines
2024-02-06Regular closures now built-in impls for AsyncFn*Michael Goulet-1/+72
2024-02-06add fixmeLukas Markeffsky-1/+4
2024-02-06Flatten confirmation logicMichael Goulet-54/+51
2024-02-06More comments, final tweaksMichael Goulet-6/+18
2024-02-06Bless tests, add commentsMichael Goulet-7/+10
2024-02-06Construct body for by-move coroutine closure outputMichael Goulet-0/+1
2024-02-06Teach typeck/borrowck/solvers how to deal with async closuresMichael Goulet-1/+301
2024-02-06Add CoroutineClosure to TyKind, AggregateKind, UpvarArgsMichael Goulet-2/+17
2024-02-05new solver: improve normalization of `Pointee::Metadata`Lukas Markeffsky-18/+6
2024-02-03No need to validate_alias_bound_self_from_param_env in ↵Michael Goulet-115/+1
assemble_alias_bound_candidates
2024-02-02Remove dead args from functionsMichael Goulet-20/+1
2024-01-29merge builtin unsize candidates againlcnr-87/+41
2024-01-29bye bye `assemble_candidates_via_self_ty`lcnr-111/+31
2024-01-23Random type checker changesMichael Goulet-1/+1
2024-01-19Add trait obligation tracking to FulfillCtxt and expose FnCtxt in ↵Gavin Gray-60/+76
rustc_infer using callback. Pass each obligation to an fn callback with its respective inference context. This avoids needing to keep around copies of obligations or inference contexts. Specify usability of inspect_typeck in comment.
2024-01-15Rollup merge of #119897 - compiler-errors:fulfillment-errors, r=lcnrMatthias Krüger-8/+8
`OutputTypeParameterMismatch` -> `SignatureMismatch` I'm probably missing something that made this rename more complicated. What did you end up getting stuck on when renaming this selection error, `@lcnr?` **also** I renamed the `FulfillmentErrorCode` variants. This is just churn but I wanted to do it forever. I can move it out of this PR if desired. r? lcnr
2024-01-13assert that trait solver is only created in proper infcxMichael Goulet-0/+5
2024-01-12Remove redundant Code from FulfillmentErrorCode variantsMichael Goulet-8/+8
2024-01-12Rollup merge of #119817 - compiler-errors:normalize-opaques, r=lcnrGuillaume Gomez-19/+22
Remove special-casing around `AliasKind::Opaque` when structurally resolving in new solver This fixes a few inconsistencies around where we don't eagerly resolve opaques to their (locally-defined) hidden types in the new solver. It essentially allows this code to work: ```rust fn main() { type Tait = impl Sized; struct S { i: i32, } let x: Tait = S { i: 0 }; println!("{}", x.i); } ``` Since `Tait` is defined in `main`, we are able to poke through the type of `x` with deref. r? lcnr
2024-01-12Auto merge of #119735 - lcnr:provisional-cache-readd, r=compiler-errorsbors-111/+265
next solver: provisional cache this adds the cache removed in #115843. However, it should now correctly track whether a provisional result depends on an inductive or coinductive stack. While working on this, I was using the following doc: https://hackmd.io/VsQPjW3wSTGUSlmgwrDKOA. I don't think it's too helpful to understanding this, but am somewhat hopeful that the inline comments are more useful. There are quite a few future perf improvements here. Given that this is already very involved I don't believe it is worth it (for now). While working on this PR one of my few attempts to significantly improve perf ended up being unsound again because I was not careful enough :sparkles: r? `@compiler-errors`
2024-01-11Remove special-casing around aliaskind in new solverMichael Goulet-19/+22
2024-01-10More commentsMichael Goulet-10/+30
2024-01-10Check reveal and can_define_opaque_ty in try_normalize_ty_recurMichael Goulet-12/+16
2024-01-09this is not a rust code snippetlcnr-4/+5
2024-01-09add comments and testslcnr-36/+58
2024-01-09avoid always rerunning in case of a cyclelcnr-34/+71
2024-01-09readd the provisional cachelcnr-62/+161
2024-01-08`all` to `any`lcnr-5/+5
don't really know why, but it is a lot easier for me to think about cycles that way.
2024-01-08do not track root depth of cycleslcnr-37/+32
results in slightly cleaner logic while making the following commit easier
2024-01-08use doc commentslcnr-3/+3
2023-12-28Movability doesn't need to be a query anymoreMichael Goulet-2/+2
2023-12-28Remove movability from TyKind::CoroutineMichael Goulet-22/+24
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-2/+2
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-19add commentlcnr-0/+14
2023-12-18dont discard overflow from normalizes-to goalslcnr-22/+45
2023-12-18track the source of nested goalslcnr-77/+145
2023-12-15Annotate some bugsMichael Goulet-2/+9
2023-12-14Unconditionally register alias-relate in projection goalMichael Goulet-11/+23
2023-12-14consistently use "next solver" instead of "new solver"lcnr-4/+4
2023-12-14update use of feature flagslcnr-5/+4
2023-12-14rename `-Ztrait-solver` to `-Znext-solver`lcnr-4/+5
2023-12-12refactor writeback: emit normalization errors with new solverlcnr-5/+4
2023-12-08Rollup merge of #117586 - compiler-errors:the-canonicalizer, r=lcnrMatthias Krüger-430/+1
Uplift the (new solver) canonicalizer into `rustc_next_trait_solver` Uplifts the new trait solver's canonicalizer into a new crate called `rustc_next_trait_solver`. The crate name is literally a bikeshed-avoidance name, so let's not block this PR on that -- renames are welcome later. There are a host of other changes that were required to make this possible: * Expose a `ConstTy` trait to get the `Interner::Ty` from a `Interner::Const`. * Expose some constructor methods to construct `Bound` variants. These are currently methods defined on the interner themselves, but they could be pulled into traits later. * Expose a `IntoKind` trait to turn a `Ty`/`Const`/`Region` into their corresponding `*Kind`s. * Some minor tweaks to other APIs in `rustc_type_ir`. The canonicalizer code itself is best reviewed **with whitespace ignored.** r? ``@lcnr``
2023-12-08Uplift canonicalizer into new trait solver crateMichael Goulet-430/+1
2023-12-08Implement `async gen` blocksMichael Goulet-0/+65
2023-12-08implement and use `NormalizesTo`lcnr-61/+71
2023-12-07add unused `NormalizesTo` predicatelcnr-0/+6
2023-12-05Continue folding if deep normalizer failsMichael Goulet-14/+40
2023-12-05Add deeply_normalize_for_diagnostics, use it in coherenceMichael Goulet-2/+18
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-2/+2
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.