about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
AgeCommit message (Collapse)AuthorLines
2024-05-12structurally important functions to `debug`lcnr-10/+13
2024-05-12solve: replace all `debug` with `trace`lcnr-63/+63
2024-05-11Apply nits, uplift ExistentialPredicate tooMichael Goulet-1/+2
2024-05-11Uplift `TraitPredicate`Michael Goulet-2/+5
2024-05-11Consolidate obligation cause codes for where clausesMichael Goulet-49/+35
2024-05-10Auto merge of #124982 - compiler-errors:uplift-trait-ref, r=lcnrbors-47/+75
Uplift `TraitRef` into `rustc_type_ir` Emotional rollercoaster r? lcnr
2024-05-10Lift `TraitRef` into `rustc_type_ir`Michael Goulet-46/+72
2024-05-10Lift `Lift`Michael Goulet-1/+3
2024-05-10Name tweaksMichael Goulet-32/+34
2024-05-10More rename falloutMichael Goulet-32/+31
2024-05-10Rename some ObligationCauseCode variantsMichael Goulet-100/+82
2024-05-10Remove glob imports for ObligationCauseCodeMichael Goulet-52/+59
2024-05-10rename some variants in FulfillmentErrorCodeMichael Goulet-41/+28
2024-05-10Auto merge of #124961 - matthiaskrgr:rollup-1jj65p6, r=matthiaskrgrbors-78/+55
Rollup of 7 pull requests Successful merges: - #124551 (Add benchmarks for `impl Debug for str`) - #124915 (`rustc_target` cleanups) - #124918 (Eliminate some `FIXME(lcnr)` comments) - #124927 (opt-dist: use xz2 instead of xz crate) - #124936 (analyse visitor: build proof tree in probe) - #124943 (always use `GenericArgsRef`) - #124955 (Use fewer origins when creating type variables.) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-10Rollup merge of #124955 - nnethercote:next_ty_var, r=lcnrMatthias Krüger-55/+15
Use fewer origins when creating type variables. To reduce lots of repetitive boilerplate code. Details in the individual commit messages. r? ``@lcnr``
2024-05-10Rollup merge of #124943 - lcnr:generic-args-ref, r=compiler-errorsMatthias Krüger-2/+2
always use `GenericArgsRef` r? ```@compiler-errors```
2024-05-10Rollup merge of #124936 - lcnr:cool-beans, r=compiler-errorsMatthias Krüger-11/+34
analyse visitor: build proof tree in probe see inline comments fixes #124791 fixes #124702 r? ```@compiler-errors```
2024-05-10Rollup merge of #124918 - nnethercote:FIXME-lcnr, r=lcnrMatthias Krüger-10/+4
Eliminate some `FIXME(lcnr)` comments In some cases this involved changing code. In some cases the comment was able to removed or replaced. r? ``@lcnr``
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-8/+8
2024-05-10De-tuple two `vtable_trait_first_method_offset` args.Nicholas Nethercote-8/+4
Thus eliminating a `FIXME` comment.
2024-05-10Remove out-of-date comment.Nicholas Nethercote-2/+0
The use of `Binder` was removed in the recent #123900, but the comment wasn't removed at the same time.
2024-05-10Use fewer origins when creating type variables.Nicholas Nethercote-55/+15
`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-09always use `GenericArgsRef`lcnr-2/+2
2024-05-09analyse visitor: build proof tree in probelcnr-11/+34
2024-05-07Fix ICEs in diagnostic::on_unimplementedMichael Goulet-51/+69
2024-05-08Auto merge of #124683 - estebank:issue-124651, r=compiler-errorsbors-6/+8
Do not ICE on foreign malformed `diagnostic::on_unimplemented` Fix #124651.
2024-05-07Rollup merge of #124846 - compiler-errors:const-eval, r=lcnrMatthias Krüger-3/+3
Don't ICE when we cannot eval a const to a valtree in the new solver Use `const_eval_resolve` instead of `try_const_eval_resolve` because naming aside, the former doesn't ICE when a value can't be evaluated to a valtree. r? lcnr
2024-05-07Rollup merge of #124827 - lcnr:generalize-incomplete, r=compiler-errorsMatthias Krüger-1/+4
generalize hr alias: avoid unconstrainable infer vars fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/108 see inline comments for more details r? `@compiler-errors` cc `@BoxyUwU`
2024-05-07generalize hr alias: avoid unconstrainable infer varslcnr-1/+4
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-65/+93
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-65/+94
2024-05-06Rollup merge of #124771 - compiler-errors:cand-has-failing-wc, r=lcnrMatthias Krüger-6/+42
Don't consider candidates with no failing where clauses when refining obligation causes in new solver Improves error messages when we have param-env candidates that don't deeply unify (i.e. after alias-bounds). r? lcnr
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-06Don't consider candidates with no failing where clausesMichael Goulet-6/+42
2024-05-06Prefer lower vtable candidates in select in new solverMichael Goulet-5/+13
2024-05-04Rollup merge of #124718 - compiler-errors:record-impl-args, r=lcnrMatthias Krüger-2/+6
Record impl args in the proof tree Weren't recording these since they went through a different infcx method r? lcnr
2024-05-04Rollup merge of #124717 - compiler-errors:do-not-recomment-next-solver, r=lcnrMatthias Krüger-0/+9
Implement `do_not_recommend` in the new solver Put the test into `diagnostic_namespace` test folder even though it's not in the diagnostic namespace, because it should be soon. r? lcnr cc `@weiznich`
2024-05-04Record impl args in the proof treeMichael Goulet-2/+6
2024-05-04Implement do_not_recommend in the new solverMichael Goulet-0/+9
2024-05-04Only consider ambiguous goals when finding best obligation for ambiguitiesMichael Goulet-9/+11
2024-05-03Rollup merge of #124418 - compiler-errors:better-cause, r=lcnrMichael Goulet-40/+200
Use a proof tree visitor to refine the `Obligation` for error reporting in new solver With the magic of `ProofTreeVisitor`, we can close the gap that we have on `ObligationCause`s being not as descriptive in the new trait solver. r? lcnr Needs some work and obviously documentation.
2024-05-03Do not ICE on foreign malformed `diagnostic::on_unimplemented`Esteban Küber-6/+8
Fix #124651.
2024-05-02Take ocx by move for pending obligationsMichael Goulet-1/+8
2024-05-02Use ObligationCtxt in favor of TraitEngine in many placesMichael Goulet-71/+99
2024-05-02Higher ranked goal source, do overflow handling less badlyMichael Goulet-80/+87
2024-05-02Use a proof tree visitor to refine the Obligation for error reportingMichael Goulet-10/+147