about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
AgeCommit message (Collapse)AuthorLines
2023-08-03Rework upcastingMichael Goulet-37/+88
2023-08-03inline helper methods into `with_new_goal`lcnr-115/+80
2023-08-03rewrite stack dependent overflow handlinglcnr-173/+180
2023-08-03handle overflow in the `EvalCtxt` separatelylcnr-189/+156
2023-08-03add `ensure_sufficient_stack` to the new solverlcnr-18/+21
2023-08-03fix `make_ambiguous_response_no_constraints`lcnr-47/+41
we previously had incorrect universes in the query response.
2023-08-03avoid more `ty::Binder:dummy`lcnr-36/+16
2023-08-02Remove constness from `TraitPredicate`Deadbeef-1/+0
2023-08-02Rollup merge of #114314 - compiler-errors:sized-crit, r=lcnrMatthias Krüger-1/+1
Tweaks to `adt_sized_constraint` fixes a comment, but also some other nits. r? lcnr
2023-08-01Don't select infer -> dyn TraitMichael Goulet-0/+3
2023-08-01Convert adt_sized_constraint to early-binder, use listMichael Goulet-1/+1
2023-07-31Rollup merge of #114200 - compiler-errors:detect-tail-unsize-then-upcast, r=lcnrMatthias Krüger-5/+20
Detect trait upcasting through struct tail unsizing in new solver select Oops, we were able to hide trait upcasting behind a parent unsize goal that evaluated to `Certainty::Yes`. Let's do rematching for `Certainty::Yes` unsize goals with `BuiltinImplSource::Misc` sources (corresponding to all of the other unsize rules) to make sure we end up selecting any nested goals which may be satisfied via `BuiltinImplSource::TraitUpcasting` or `::TupleUnsizing`. r? ``@lcnr``
2023-07-31Rollup merge of #114169 - lcnr:unsize, r=compiler-errorsMatthias Krüger-218/+258
refactor builtin unsize handling, extend comments r? `@compiler-errors`
2023-07-29Detect trait upcasting through struct tail unsizingMichael Goulet-5/+20
2023-07-29Bubble up nested goals from equation in predicates_for_object_candidateMichael Goulet-23/+24
2023-07-28fix commentlcnr-2/+2
2023-07-28refactor builtin unsize handling, extend commentslcnr-217/+257
2023-07-28Auto merge of #114134 - fee1-dead-contrib:rm-constness-from-param-env, r=oli-obkbors-8/+5
Remove `constness` from `ParamEnv` This should be replaced by keyword generics/effects. cc #110395 r? `@oli-obk`
2023-07-27Remove `constness` from `ParamEnv`Deadbeef-8/+5
2023-07-27Consider a goal as NOT changed if its response is identity modulo regionsMichael Goulet-1/+1
2023-07-27Revert "don't uniquify regions when canonicalizing"Michael Goulet-11/+14
This reverts commit 171f5414705194067557cd7b70bd680308b9cced.
2023-07-25Rollup merge of #113661 - oli-obk:tait_wtf, r=lcnrMatthias Krüger-0/+1
Double check that hidden types match the expected hidden type Fixes https://github.com/rust-lang/rust/issues/113278 specifically, but I left a TODO for where we should also add some hardening. It feels a bit like papering over the issue, but at least this way we don't get unsoundness, but just surprising errors. Errors will be improved and given spans before this PR lands. r? `@compiler-errors` `@lcnr`
2023-07-25Make everything builtin!Michael Goulet-264/+211
2023-07-25Consolidate trait upcasting and unsize into one normalizationMichael Goulet-197/+237
2023-07-25Restore tuple unsizing feature gateMichael Goulet-0/+3
2023-07-25Make sure to detect trait upcasting coercion even after normalizationMichael Goulet-1/+7
2023-07-25Normalize the RHS of an unsize goalMichael Goulet-67/+139
2023-07-24Rollup merge of #113987 - compiler-errors:comments, r=lcnrMatthias Krüger-16/+64
Comment stuff in the new solver r? `@lcnr`
2023-07-24lcnr's suggestionsMichael Goulet-4/+5
Co-authored-by: lcnr <rust@lcnr.de>
2023-07-23more clippy::style fixes:Matthias Krüger-2/+2
get_first single_char_add_str unnecessary_mut_passed manual_map manual_is_ascii_check
2023-07-23Comment stuff in the new solverMichael Goulet-16/+63
2023-07-22Get rid of subst-relate incompleteness in new solverMichael Goulet-9/+12
2023-07-21Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"David Tolnay-14/+3
This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
2023-07-21Auto merge of #113922 - matthiaskrgr:rollup-90cj2vv, r=matthiaskrgrbors-13/+12
Rollup of 4 pull requests Successful merges: - #113887 (new solver: add a separate cache for coherence) - #113910 (Add FnPtr ty to SMIR) - #113913 (error/E0691: include alignment in error message) - #113914 (rustc_target: drop duplicate code) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-21Double check that hidden types match the expected hidden typeOli Scherer-0/+1
2023-07-21new solver: add a separate cache for coherencelcnr-13/+12
2023-07-21Track ABI info. in `NaiveLayout`, and use it for `PointerLike` checksMoulins-3/+14
THis significantly complicates `NaiveLayout` logic, but is necessary to ensure that bounds like `NonNull<T>: PointerLike` hold in generic contexts. Also implement exact layout computation for structs.
2023-07-20update doc commentslcnr-10/+17
2023-07-20reviewlcnr-4/+4
2023-07-20re-add commentlcnr-0/+6
2023-07-20assembly: only consider blanket impls oncelcnr-68/+226
2023-07-20XSimplifiedType to SimplifiedType::Xlcnr-1/+1
2023-07-17Rename arg_iter to iter_instantiatedMichael Goulet-2/+3
2023-07-16Check GAT, IAT, and weak type where clauses during projectionMichael Goulet-6/+34
2023-07-16Add support for inherent projectionsMichael Goulet-1/+44
2023-07-15Rollup merge of #113625 - compiler-errors:structurally-norm-in-selection, r=lcnrMatthias Krüger-6/+33
Structurally normalize in selection We need to do this because of the fact that we're checking the `Ty::kind` on a type during selection, but goals passed into select are not necessarily normalized. Right now, we're (kinda) unnecessarily normalizing the RHS of a trait upcasting goal, which is broken for different reasons (#113393). But I'm waiting for this PR to land before discussing that one. r? `@lcnr`
2023-07-14Auto merge of #113471 - compiler-errors:new-solver-norm-escaping, r=lcnrbors-2/+16
Allow escaping bound vars during `normalize_erasing_regions` in new solver Add `AllowEscapingBoundVars` to `deeply_normalize`, and use it in the new solver in the `query_normalize` routine. Ideally, we'd make all `query_normalize` calls handle pass in `AllowEscapingBoundVars` individually, because really the only `query_normalize` call that needs `AllowEscapingBoundVars::Yes` is the one in `try_normalize_generic_arg_after_erasing_regions`, but I think that's kind of overkill. I am happy to be convinced otherwise, though. r? `@lcnr`
2023-07-14Structurally normalize in selectionMichael Goulet-6/+33
2023-07-14assertion, commentMichael Goulet-0/+4
2023-07-14Allow escaping bound vars during normalize_erasing_regions in new solverMichael Goulet-2/+12