Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate consider_unsize_to_dyn_candidate from other unsize candidates #114829

Merged

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 15, 2023

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 15, 2023
@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@lcnr
Copy link
Contributor

lcnr commented Aug 15, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 15, 2023

📌 Commit 7d8563c has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2023
…llaumeGomez

Rollup of 10 pull requests

Successful merges:

 - rust-lang#114711 (Infer `Lld::No` linker hint when the linker stem is a generic compiler driver)
 - rust-lang#114772 (Add `{Local}ModDefId` to more strongly type DefIds`)
 - rust-lang#114800 (std: add some missing repr(transparent))
 - rust-lang#114820 (Add test for unknown_lints from another file.)
 - rust-lang#114825 (Upgrade std to gimli 0.28.0)
 - rust-lang#114827 (Only consider object candidates for object-safe dyn types in new solver)
 - rust-lang#114828 (Probe when assembling upcast candidates so they don't step on eachother's toes in new solver)
 - rust-lang#114829 (Separate `consider_unsize_to_dyn_candidate` from other unsize candidates)
 - rust-lang#114830 (Clean up some bad UI testing annotations)
 - rust-lang#114831 (Check projection args before substitution in new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit da4e7bd into rust-lang:master Aug 15, 2023
11 checks passed
@compiler-errors compiler-errors deleted the next-solver-only-unsize-to-dyn-once branch August 15, 2023 18:02
@rustbot rustbot added this to the 1.73.0 milestone Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguity, differing outlives constraints with types equal modulo normalization
4 participants