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

Detect trait upcasting through struct tail unsizing in new solver select #114200

Merged

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 29, 2023

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

@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 labels Jul 29, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 29, 2023

Some changes occurred to the core trait solver

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

@lcnr
Copy link
Contributor

lcnr commented Jul 31, 2023

@bors r+ rollup

I think longterm we want to support unstable trait impls by adding a flag to the query result. For now this seems appropriate.

@bors
Copy link
Contributor

bors commented Jul 31, 2023

📌 Commit 752e6e1 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 Jul 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#114111 (Improve test case for experimental API remove_matches)
 - rust-lang#114169 (refactor builtin unsize handling, extend comments)
 - rust-lang#114182 (clean up after 113312)
 - rust-lang#114193 (Update lexer emoji diagnostics to Unicode 15.0)
 - rust-lang#114200 (Detect trait upcasting through struct tail unsizing in new solver select)
 - rust-lang#114228 (Check lazy type aliases for well-formedness)
 - rust-lang#114267 (Map RPITIT's opaque type bounds back from projections to opaques)
 - rust-lang#114269 (Migrate GUI colors test to original CSS color format)
 - rust-lang#114286 (Add missing feature gate in multiple_supertrait_upcastable doc)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#109318 (Make `Debug` representations of `[Lazy, Once]*[Cell, Lock]` consistent with `Mutex` and `RwLock`)
 - rust-lang#113701 (Re-export core::ffi::FromBytesUntilNulError in std::ffi)
 - rust-lang#113804 (Resolve correct archive version name in `opt-dist`)
 - rust-lang#114165 (Add missing rvalues to smir)
 - rust-lang#114182 (clean up after 113312)
 - rust-lang#114193 (Update lexer emoji diagnostics to Unicode 15.0)
 - rust-lang#114200 (Detect trait upcasting through struct tail unsizing in new solver select)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c73e232 into rust-lang:master Aug 1, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 1, 2023
@compiler-errors compiler-errors deleted the detect-tail-unsize-then-upcast branch August 11, 2023 19:58
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants