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

Prefer lower TraitUpcasting candidates in selection #135498

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

compiler-errors
Copy link
Member

Fixes #135463. The underlying cause is this ambiguity, but it's more clear (and manifests as a coercion error, rather than a MIR validation error) when it's written the way I did in the UI test.

Sorry this is cursed 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 Jan 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2025

Some changes occurred to the core trait solver

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

Zetelias

This comment was marked as spam.

@lcnr
Copy link
Contributor

lcnr commented Jan 15, 2025

:(

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 15, 2025

📌 Commit bf545ce 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 Jan 15, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 15, 2025
…leteness, r=lcnr

Prefer lower `TraitUpcasting` candidates in selection

Fixes rust-lang#135463. The underlying cause is this ambiguity, but it's more clear (and manifests as a coercion error, rather than a MIR validation error) when it's written the way I did in the UI test.

Sorry this is cursed r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2025
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131806 (Treat other items as functions for the purpose of type-based search)
 - rust-lang#132654 (std: lazily allocate the main thread handle)
 - rust-lang#135003 (deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead)
 - rust-lang#135428 (rustdoc: Remove `AttributesExt` trait magic that added needless complexity)
 - rust-lang#135498 (Prefer lower `TraitUpcasting` candidates in selection)
 - rust-lang#135529 (remove outdated FIXME)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2025
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#132654 (std: lazily allocate the main thread handle)
 - rust-lang#135003 (deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead)
 - rust-lang#135428 (rustdoc: Remove `AttributesExt` trait magic that added needless complexity)
 - rust-lang#135498 (Prefer lower `TraitUpcasting` candidates in selection)
 - rust-lang#135507 (TRPL: incorporate all backward-compatible Edition changes)
 - rust-lang#135529 (remove outdated FIXME)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b1035d7 into rust-lang:master Jan 15, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2025
Rollup merge of rust-lang#135498 - compiler-errors:dyn-upcasting-completeness, r=lcnr

Prefer lower `TraitUpcasting` candidates in selection

Fixes rust-lang#135463. The underlying cause is this ambiguity, but it's more clear (and manifests as a coercion error, rather than a MIR validation error) when it's written the way I did in the UI test.

Sorry this is cursed r? lcnr
@compiler-errors compiler-errors deleted the dyn-upcasting-completeness branch January 15, 2025 22:12
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.

Trait upcasting ICE with projection in (duplicate) supertrait bound
6 participants