Skip to content

Conversation

@dingxiangfei2009
Copy link
Contributor

@dingxiangfei2009 dingxiangfei2009 commented Nov 18, 2025

The new checks are we check the pair of constituent types for same shapes structurally, and demand capability for dispatch for ADTs as usual; and we demand source generic parameter to be unsized of another for sanity.

Fix #148727

cc @theemathas

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2025

r? @WaffleLapkin

rustbot has assigned @WaffleLapkin.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@dingxiangfei2009
Copy link
Contributor Author

dingxiangfei2009 commented Nov 18, 2025

@theemathas What do you think? Can we break DispatchFromDyn further?

@dingxiangfei2009 dingxiangfei2009 force-pushed the dispatch-from-dyn-due-diligence branch from 75de383 to 88de0f9 Compare November 18, 2025 21:39
@rustbot

This comment has been minimized.

The new checks are we check the pair of constituent types for same
shapes structurally, and demand capability for dispatch for ADTs
as usual; and we demand source generic parameter to be unsized of
another for sanity.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@dingxiangfei2009 dingxiangfei2009 force-pushed the dispatch-from-dyn-due-diligence branch from 88de0f9 to b7f84d2 Compare November 18, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsoundness and ICE due to DispatchFromDyn allowing bogus impls on references.

3 participants