about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/eval_ctxt
AgeCommit message (Collapse)AuthorLines
2024-06-18Uplift the new trait solverMichael Goulet-1686/+0
2024-06-18SolverDelegateMichael Goulet-28/+31
2024-06-16Uplift OpaqueTypeKey too, use it in responseMichael Goulet-9/+3
2024-06-16Uplift ExternalConstraintDataMichael Goulet-15/+27
2024-06-16Make ExternalConstraints just carry outlivesMichael Goulet-18/+22
2024-06-16Move InferCtxtSelectExt out of eval_ctxt moduleMichael Goulet-186/+0
2024-06-16Auto merge of #126505 - compiler-errors:no-vtable, r=lcnrbors-38/+2
Only compute vtable information during codegen This PR removes vtable information from the `Object` and `TraitUpcasting` candidate sources in the trait solvers, and defers the computation of relevant information to `Instance::resolve`. This is because vtables really aren't a thing in the trait world -- they're an implementation detail in codegen. Previously it was just easiest to tangle this information together since we were already doing the work of looking at all the supertraits in the trait solver, and specifically because we use traits to represent when it's possible to call a method via a vtable (`Object` candidate) and do upcasting (`Unsize` candidate). but I am somewhat suspicious we're doing a *lot* of extra work, especially in polymorphic contexts, so let's see what perf says.
2024-06-14Only compute vtable information during codegenMichael Goulet-38/+2
2024-06-14Make proof tree probing genericMichael Goulet-38/+45
2024-06-14Make Candidate generic over internerMichael Goulet-1/+1
2024-06-13Fix some TODOsMichael Goulet-4/+3
2024-06-13Finish uplifting all of structural_traitsMichael Goulet-157/+136
2024-06-11Try not to make obligations in handle_opaque_typeMichael Goulet-8/+7
2024-06-06Uplift TypeRelation and RelateMichael Goulet-4/+4
2024-06-05Add `Ty` to `ConstKind::Value`Boxy-2/+7
2024-06-05Basic removal of `Ty` from places (boring)Boxy-8/+8
2024-05-31Stop using translate_args in the new solverMichael Goulet-11/+0
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-15/+21
2024-05-28EvalCtxt::tcx() -> EvalCtxt::interner()Michael Goulet-15/+17
2024-05-28eagerly normalize when adding goalslcnr-2/+75
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-22/+5
2024-05-20Rework var resolution in InferCtxtLike, uplift EagerResolverMichael Goulet-1/+1
2024-05-19Make EvalCtxt generic over internerMichael Goulet-22/+27
2024-05-19Make search graph generic over internerMichael Goulet-3/+3
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-18Make proof tree building genericMichael Goulet-3/+3
2024-05-18Uplift inspect into rustc_type_irMichael Goulet-19/+27
2024-05-18Uplift GenericArgKind, CanonicalVarValues, QueryInputMichael Goulet-13/+17
and make NestedGoals generic
2024-05-13Use a proper probe for shadowing implMichael Goulet-1/+2
2024-05-13Auto merge of #125076 - compiler-errors:alias-term, r=lcnrbors-5/+5
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-5/+5
2024-05-13Remove `extern crate rustc_middle` from `rustc_trait_selection`.Nicholas Nethercote-0/+3
2024-05-12structurally important functions to `debug`lcnr-3/+4
2024-05-12solve: replace all `debug` with `trace`lcnr-21/+21
2024-05-10Rollup merge of #124955 - nnethercote:next_ty_var, r=lcnrMatthias Krüger-14/+4
Use fewer origins when creating type variables. To reduce lots of repetitive boilerplate code. Details in the individual commit messages. r? ``@lcnr``
2024-05-10Use fewer origins when creating type variables.Nicholas Nethercote-14/+4
`InferCtxt::next_{ty,const}_var*` all take an origin, but the `param_def_id` is almost always `None`. This commit changes them to just take a `Span` and build the origin within the method, and adds new methods for the rare cases where `param_def_id` might not be `None`. This avoids a lot of tedious origin building. Specifically: - next_ty_var{,_id_in_universe,_in_universe}: now take `Span` instead of `TypeVariableOrigin` - next_ty_var_with_origin: added - next_const_var{,_in_universe}: takes Span instead of ConstVariableOrigin - next_const_var_with_origin: added - next_region_var, next_region_var_in_universe: these are unchanged, still take RegionVariableOrigin The API inconsistency (ty/const vs region) seems worth it for the large conciseness improvements.
2024-05-09analyse visitor: build proof tree in probelcnr-0/+1
2024-05-07Don't ICE when we cannot eval a const to a valtree in the new solverMichael Goulet-3/+3
2024-05-06Rollup merge of #124809 - lcnr:prepopulate-opaques, r=compiler-errorsMatthias Krüger-9/+6
borrowck: prepopulate opaque storage more eagerly otherwise we ICE due to ambiguity when normalizing while computing implied bounds. r? ``@compiler-errors``
2024-05-06Rollup merge of #124759 - compiler-errors:impl-args, r=lcnrMatthias Krüger-59/+26
Record impl args in the proof tree in new solver Rather than rematching them during select. Also use `ImplSource::Param` instead of `ImplSource::Builtin` for alias-bound candidates, so we don't ICE in `Instance::resolve`. r? lcnr
2024-05-06Use correct ImplSource for alias boundsMichael Goulet-2/+1
2024-05-06Record impl args in the InsepctCandiate rather than rematching during selectMichael Goulet-59/+27
2024-05-06Rollup merge of #124724 - compiler-errors:prefer-lower, r=lcnrMatthias Krüger-5/+13
Prefer lower vtable candidates in select in new solver Also, adjust the select visitor to only winnow when the *parent* goal is `Certainty::Yes`. This means that we won't winnow in cases when we have any ambiguous inference guidance from two candidates. r? lcnr
2024-05-06switch new solver to directly inject opaque typeslcnr-9/+6
2024-05-06Prefer lower vtable candidates in select in new solverMichael Goulet-5/+13
2024-05-04Record impl args in the proof treeMichael Goulet-2/+6