Skip to content

Error on projection of dyn noncompat type in old trait solver - #154992

Open
spirali wants to merge 4 commits into
rust-lang:mainfrom
spirali:fix-dyn-projection
Open

Error on projection of dyn noncompat type in old trait solver#154992
spirali wants to merge 4 commits into
rust-lang:mainfrom
spirali:fix-dyn-projection

Conversation

@spirali

@spirali spirali commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

View all comments

Trying to fix rust-lang/trait-system-refactor-initiative#269

I am not sure that the check is placed into the right place in the code.

r? lcnr

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 8, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 8, 2026
//~^ ERROR the trait `Foo` is not dyn compatible
x.method();
//~^ ERROR the trait `Foo` is not dyn compatible
//~^ ERROR no method named `method` found for reference `&dyn Foo`

@lcnr lcnr Apr 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View changes since the review

that's annoying :< ideally we'd silence method errors if the self type is not well-formed, tracking that is non-trivial and I don't know how we'd do so myself rn

@lcnr

lcnr commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

lgtm, let's do a crater run, there should be exactly 1 regression from this

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 9, 2026
Error on projection of dyn noncompat type in old trait solver
@rust-bors

rust-bors Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a611f2a (a611f2a14e38407ec6717a86a01424ee6fc80762, parent: 1fe72d35998dea48aeecaf7fc07783b0b553f24f)

@lcnr

lcnr commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-154992 created and queued.
🤖 Automatically detected try build a611f2a
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2026
@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-154992 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-154992 is completed!
📊 18 regressed and 6 fixed (886019 total)
📊 5676 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-154992/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 22, 2026
@lcnr

lcnr commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-154992-1 created and queued.
🤖 Automatically detected try build a611f2a
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2026
@lcnr

lcnr commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

@craterbot p=1

@craterbot

Copy link
Copy Markdown
Collaborator

📝 Configuration of the pr-154992-1 experiment changed.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-154992-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-154992-1 is completed!
📊 13 regressed and 0 fixed (5381 total)
📊 968 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-154992-1/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 27, 2026
@lcnr

lcnr commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

@craterbot check crates=https://crater-reports.s3.amazonaws.com/pr-154992-1/retry-regressed-list.txt p=1

surprising that we have that many spurious regressions still?

it's caused by build OOMs and unlike the new solver, this PR shouldn't really change max-rss in any way 😅 cc @rust-lang/infra

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-154992-2 created and queued.
🤖 Automatically detected try build a611f2a
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2026
@lcnr

lcnr commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@rfcbot fcp merge types

@rust-rfcbot

rust-rfcbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@lcnr has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Aug 4, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Aug 16, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

let tcx = selcx.tcx();
if !tcx.is_dyn_compatible(def_id) {
let span = obligation.cause.span;
let guar = if span.is_dummy()

@lcnr lcnr Aug 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment why we can delay bug here

I guess it's that this should be handled in WF instead?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment added

@lcnr lcnr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final nit, then r=me

View changes since this review

@Kobzol

Kobzol commented Aug 17, 2026

Copy link
Copy Markdown
Member

@bors delegate

@rust-bors

rust-bors Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

✌️ @spirali, you can now approve this pull request!

If @Kobzol told you to "r=me" after making some further change, then please make that change and post @bors r=Kobzol.

View changes since this delegation.

@spirali

spirali commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@bors r=lcnr

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e2fcf35 has been approved by lcnr

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 22, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 22, 2026
Error on projection of dyn noncompat type in old trait solver

Trying to fix rust-lang/trait-system-refactor-initiative#269

I am not sure that the check is placed into the right place in the code.

r? lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 22, 2026
Error on projection of dyn noncompat type in old trait solver

Trying to fix rust-lang/trait-system-refactor-initiative#269

I am not sure that the check is placed into the right place in the code.

r? lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 22, 2026
Error on projection of dyn noncompat type in old trait solver

Trying to fix rust-lang/trait-system-refactor-initiative#269

I am not sure that the check is placed into the right place in the code.

r? lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 22, 2026
Error on projection of dyn noncompat type in old trait solver

Trying to fix rust-lang/trait-system-refactor-initiative#269

I am not sure that the check is placed into the right place in the code.

r? lcnr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. 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. to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

old solver: check dyn compatability when normalizing

7 participants