Skip to content

incorrectly prefer builtin dyn impls :3 #141347

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

Merged
merged 1 commit into from
May 22, 2025

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented May 21, 2025

This makes #57893 slightly more exploitable with the new solver. It's still strictly better than the old solver and the underlying unsoundness persists in the new one even without this preference.

Properly fixing #57893 is something we've been looking at more deeply recently and discussed at the Types Meetup during the All-Hands. Whatever approach we'll end up deciding on will likely require a fairly long transition period and some significant further design work. This should not block -Znext-solver.

fixes rust-lang/trait-system-refactor-initiative#183

r? @compiler-errors cc @rust-lang/types

@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 May 21, 2025
@compiler-errors compiler-errors changed the title incorrectly prefer builtin impls :3 incorrectly prefer builtin dyn impls :3 May 21, 2025
@compiler-errors
Copy link
Member

good enough

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 21, 2025

📌 Commit 5d9141c has been approved by compiler-errors

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 May 21, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2025
builtin dyn impl no guide inference

cc rust-lang#141347

we can already slightly restrict this behavior in the old solver, so why not do so. Needs crater and an FCP.

r? `@compiler-errors`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#140526 (docs: Specify that common sort functions sort in an ascending direction)
 - rust-lang#141230 (std: fix doctest and explain for `as_slices` and `as_mut_slices` in `VecDeque`)
 - rust-lang#141341 (limit impls of `VaArgSafe` to just types that are actually safe)
 - rust-lang#141347 (incorrectly prefer builtin `dyn` impls :3)
 - rust-lang#141351 (Move -Zcrate-attr injection to just after crate root parsing)
 - rust-lang#141356 (lower bodies' params to thir before the body's value)
 - rust-lang#141357 (`unpretty=thir-tree`: don't require the final expr to be the body's value)
 - rust-lang#141363 (Document why we allow escaping bound vars in LTA norm)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 69b13e4 into rust-lang:master May 22, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 22, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2025
Rollup merge of rust-lang#141347 - lcnr:lets-make-it-unsound-3, r=compiler-errors

incorrectly prefer builtin `dyn` impls :3

This makes rust-lang#57893 slightly more exploitable with the new solver. It's still strictly better than the old solver and the underlying unsoundness persists in the new one even without this preference.

Properly fixing rust-lang#57893 is something we've been looking at more deeply recently and discussed at the [Types Meetup during the All-Hands](https://hackmd.io/rz-4ghMzTb2wXOkdLKHaHw#Dyn-traits). Whatever approach we'll end up deciding on will likely require a fairly long transition period and some significant further design work. This should not block `-Znext-solver`.

fixes rust-lang/trait-system-refactor-initiative#183

r? `@compiler-errors` cc `@rust-lang/types`
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.

better_any regression
4 participants