Skip to content

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

Merged
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
spirali:fix-dyn-projection
Aug 22, 2026
Merged

Error on projection of dyn noncompat type in old trait solver#154992
rust-bors[bot] merged 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
@rust-rfcbot rust-rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Aug 6, 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
rust-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - #151061 (Build rustc and codegen backends with -Zembed-metadata=no)
 - #154992 (Error on projection of dyn noncompat type in old trait solver)
 - #157949 (Allow self in const generics)
 - #158588 (trait_selection: fix assumptions-on-binders diagnostics)
 - #159954 (core: implement float conversion methods)
 - #160136 (Add `Default` implementation for `std::sync::Once`)
 - #160835 (resolver diagnostics: don't swallow labels and point out  similar items as a note, not a label)
 - #161048 (Improve the ABI between the panic runtime and libstd)
 - #161292 (Add safety comments in alloc::Wtf8)
 - #161444 (Add some `rustc_type_ir` comments)
 - #161465 (Remove leftover immediate creation)
 - #159098 (Add Arc/Rc::strong_count_from_raw)
 - #159282 (Update documentation for `-Zdump-dep-graph`)
 - #161401 (Remove fields from TypeKind: Bool, Char, Float and Int)
 - #161431 (bootstrap: (offload) be stricter about selected compiler and paths)
 - #161451 (Avoid arming the Windows TLS destructor guard in fibers)
 - #161463 (Add myself to mailmap)
 - #161476 (Use bitset for locals_with_use_data)
 - #161483 (Warn about running ui-fulldeps tests in stage 1)

Failed merges:

 - #161443 (add internal DSL for testing binders)
@rust-bors
rust-bors Bot merged commit 9c98028 into rust-lang:main Aug 22, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 22, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
Rollup merge of #154992 - spirali:fix-dyn-projection, r=lcnr

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
@dimpolo

dimpolo commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

I noticed some breakage in todays nightly #161536 and my LLM pointed me at this issue

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

8 participants