rust/compiler/rustc_trait_selection/src/solve
Guillaume Gomez da4e7bd0cd
Rollup merge of #114829 - compiler-errors:next-solver-only-unsize-to-dyn-once, r=lcnr
Separate `consider_unsize_to_dyn_candidate` from other unsize candidates

Move the unsize candidate assembly *just for* `T -> dyn Trait` out of `assemble_candidates_via_self_ty` so that we only consider it once, instead of for every normalization step of the self ty. This makes sure that we don't assemble several candidates that are equal modulo normalization when we really don't care about normalizing the self type of an `T: Unsize<dyn Trait>` goal anyways.

Fixes rust-lang/trait-system-refactor-initiative#57

r? lcnr
2023-08-15 14:29:49 +02:00
..
assembly Rollup merge of #114829 - compiler-errors:next-solver-only-unsize-to-dyn-once, r=lcnr 2023-08-15 14:29:49 +02:00
eval_ctxt Remove constness from ImplSource::Param 2023-08-14 02:17:30 +00:00
search_graph lower evaluate_goal stability check to warn 2023-08-12 20:37:53 +02:00
alias_relate.rs avoid more ty::Binder:dummy 2023-08-03 14:16:26 +02:00
canonicalize.rs resolve before canonicalization, ICE if unresolved 2023-08-03 20:05:40 +00:00
eval_ctxt.rs lower evaluate_goal stability check to warn 2023-08-12 20:37:53 +02:00
fulfill.rs avoid building proof trees in select 2023-07-10 15:17:01 +02:00
inherent_projection.rs Comment stuff in the new solver 2023-07-23 12:30:52 -07:00
inspect.rs avoid building proof trees in select 2023-07-10 15:17:01 +02:00
mod.rs normalize in trait_ref_is_knowable in new solver 2023-08-12 20:37:53 +02:00
normalize.rs avoid more ty::Binder:dummy 2023-08-03 14:16:26 +02:00
opaques.rs Comment stuff in the new solver 2023-07-23 12:30:52 -07:00
project_goals.rs Separate consider_unsize_to_dyn_candidate from other unsize candidates 2023-08-15 01:02:43 +00:00
trait_goals.rs Rollup merge of #114829 - compiler-errors:next-solver-only-unsize-to-dyn-once, r=lcnr 2023-08-15 14:29:49 +02:00
weak_types.rs lcnr's suggestions 2023-07-24 08:37:40 -07:00