about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
AgeCommit message (Collapse)AuthorLines
2024-05-29Add lang item for AsyncFnKindHelper::UpvarsMichael Goulet-8/+1
2024-05-29Add lang item for Future::OutputMichael Goulet-12/+2
2024-05-29Add lang items for AsyncFn's associated typesMichael Goulet-8/+14
2024-05-29Partially implement `ConstArgHasType`Boxy-2/+24
2024-05-29Optimize async drop glue for some old typesDaria Sukhonina-1/+1
2024-05-29Rollup merge of #125664 - compiler-errors:trace-tweaks, r=lcnr许杰友 Jieyou Xu (Joe)-7/+2
Tweak relations to no longer rely on `TypeTrace` Remove `At::trace`, and inline all of the `Trace::equate`,etc methods into `At`. The only nontrivial change is that we use `AliasTerm` to relate two unevaluated consts in the old-solver impl of `ConstEquate`, since `AliasTerm` does implement `ToTrace` and will relate the args structurally (shallowly). r? lcnr
2024-05-28Get rid of manual Trace callsMichael Goulet-7/+2
2024-05-28Make ProofTreeBuilder actually generic over internerMichael Goulet-79/+80
2024-05-28EvalCtxt::tcx() -> EvalCtxt::interner()Michael Goulet-92/+108
2024-05-28eagerly normalize when adding goalslcnr-2/+75
2024-05-28refactor analyse visitor to instantiate states in orderlcnr-45/+41
2024-05-28add debug_assert to alias-relatelcnr-0/+1
2024-05-27Auto merge of #125413 - lcnr:ambig-drop-region-constraints, r=compiler-errorsbors-25/+39
drop region constraints for ambiguous goals See the comment in `compute_external_query_constraints`. While the underlying issue is preexisting, this fixes a bug introduced by #125343. It slightly weakens the leak chec, even if we didn't have any test which was affected. I want to write such a test before merging this PR. r? `@compiler-errors`
2024-05-24drop region constraints for ambiguous goalslcnr-25/+39
2024-05-24remove proof tree formatter, make em shallowlcnr-200/+92
2024-05-22Rollup merge of #125259 - compiler-errors:fn-mut-as-a-treat, r=oli-obkLeón Orell Valerian Liehr-8/+5
An async closure may implement `FnMut`/`Fn` if it has no self-borrows There's no reason that async closures may not implement `FnMut` or `Fn` if they don't actually borrow anything with the closure's env lifetime. Specifically, #123660 made it so that we don't always need to borrow captures from the closure's env. See the doc comment on `should_reborrow_from_env_of_parent_coroutine_closure`: https://github.com/rust-lang/rust/blob/c00957a3e269219413041a4e3565f33b1f9d0779/compiler/rustc_hir_typeck/src/upvar.rs#L1777-L1823 If there are no such borrows, then we are free to implement `FnMut` and `Fn` as permitted by our closure's inferred `ClosureKind`. As far as I can tell, this change makes `async || {}` work in precisely the set of places they used to work before #120361. Fixes #125247. r? oli-obk
2024-05-22Auto merge of #125326 - ↵bors-1/+4
weiznich:move/do_not_recommend_to_diganostic_namespace, r=compiler-errors Move `#[do_not_recommend]` to the `#[diagnostic]` namespace This commit moves the `#[do_not_recommend]` attribute to the `#[diagnostic]` namespace. It still requires `#![feature(do_not_recommend)]` to work. r? `@compiler-errors`
2024-05-21Move `#[do_not_recommend]` to the `#[diagnostic]` namespaceGeorg Semmler-1/+4
This commit moves the `#[do_not_recommend]` attribute to the `#[diagnostic]` namespace. It still requires `#![feature(do_not_recommend)]` to work.
2024-05-21Auto merge of #125284 - compiler-errors:uplift-misc, r=lcnrbors-2/+2
Uplift `RegionVid`, `TermKind` to `rustc_type_ir`, and `EagerResolver` to `rustc_next_trait_solver` - Uplift `RegionVid`. This was complicated due to the fact that we implement `polonius_engine::Atom` for `RegionVid` -- but I just separated that into `PoloniusRegionVid`, and added `From`/`Into` impls so it can be defined in `rustc_borrowck` separately. Coherence 😵 - Change `InferCtxtLike` to expose `opportunistically_resolve_{ty,ct,lt,int,float}_var` so that we can uplift `EagerResolver` for use in the canonicalization methods. - Uplift `TermKind` much like `GenericArgKind` All of this is miscellaneous dependencies for making more `EvalCtxt` methods generic.
2024-05-20track cycle participants per entrylcnr-50/+128
2024-05-20move global cache lookup into fnlcnr-42/+44
2024-05-20move fixpoint step into subfunctionlcnr-53/+76
2024-05-20Rework var resolution in InferCtxtLike, uplift EagerResolverMichael Goulet-2/+2
2024-05-19Make EvalCtxt generic over internerMichael Goulet-121/+138
2024-05-19Make search graph generic over internerMichael Goulet-53/+63
2024-05-18Move NormalizesTo back downMichael Goulet-5/+7
I tried to rebase this down into the first commit but it is WAY too annoying x
2024-05-18Stop using def_kind() in solverMichael Goulet-17/+8
2024-05-18Make proof tree building genericMichael Goulet-93/+107
2024-05-18Uplift inspect into rustc_type_irMichael Goulet-62/+78
2024-05-18Uplift GenericArgKind, CanonicalVarValues, QueryInputMichael Goulet-19/+22
and make NestedGoals generic
2024-05-18An async closure may implement FnMut/Fn if it has no self-borrowsMichael Goulet-8/+5
2024-05-17Rollup merge of #125191 - compiler-errors:wf, r=lcnrMatthias Krüger-20/+57
Report better WF obligation leaf obligations in new solver r? lcnr
2024-05-16Report better WF obligation leaf obligations in new solverMichael Goulet-20/+57
2024-05-16Uplift Goal to rustc_type_irMichael Goulet-5/+6
2024-05-16Make impls UpcastFrom, implement Upcast for UpcastFromMichael Goulet-1/+1
2024-05-16Rename ToPredicate for UpcastMichael Goulet-19/+17
2024-05-16Don't ICE because recomputing overflow goals during ↵Michael Goulet-41/+64
find_best_leaf_obligation causes inference side-effects
2024-05-13Use a proper probe for shadowing implMichael Goulet-22/+34
2024-05-13Auto merge of #125076 - compiler-errors:alias-term, r=lcnrbors-54/+32
Split out `ty::AliasTerm` from `ty::AliasTy` Splitting out `AliasTerm` (for use in project and normalizes goals) and `AliasTy` (for use in `ty::Alias`) r? lcnr
2024-05-13split out AliasTy -> AliasTermMichael Goulet-54/+32
2024-05-13Remove `extern crate rustc_middle` from `rustc_trait_selection`.Nicholas Nethercote-0/+10
2024-05-12structurally important functions to `debug`lcnr-10/+13
2024-05-12solve: replace all `debug` with `trace`lcnr-63/+63
2024-05-10Auto merge of #124982 - compiler-errors:uplift-trait-ref, r=lcnrbors-8/+11
Uplift `TraitRef` into `rustc_type_ir` Emotional rollercoaster r? lcnr
2024-05-10Lift `TraitRef` into `rustc_type_ir`Michael Goulet-8/+11
2024-05-10More rename falloutMichael Goulet-3/+2
2024-05-10Rename some ObligationCauseCode variantsMichael Goulet-8/+6
2024-05-10Remove glob imports for ObligationCauseCodeMichael Goulet-8/+11
2024-05-10rename some variants in FulfillmentErrorCodeMichael Goulet-10/+6
2024-05-10Rollup merge of #124955 - nnethercote:next_ty_var, r=lcnrMatthias Krüger-33/+8
Use fewer origins when creating type variables. To reduce lots of repetitive boilerplate code. Details in the individual commit messages. r? ``@lcnr``