Skip PhantomData in Unsize checks by dingxiangfei2009 · Pull Request #149968 · rust-lang/rust
rustbot
added
S-waiting-on-review
labels
Dec 14, 2025
theemathas
added
the
T-types
label
Dec 14, 2025
theemathas
added
the
needs-fcp
label
Dec 14, 2025
lcnr
added
S-waiting-on-author
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Dec 15, 2025and removed T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue. Relevant to the library team, which will review and decide on the PR/issue.labels
Dec 15, 2025This patch proposes relaxation on the type unsizing condition. `PhantomData` has been in the current type system exempted from being treated as carrying any data, including dropck, virtual call dispatch by `DispatchFromDyn` and unsizing container by `CoerceUnsize`. `PhantomData` is a special 1-ZST that really carries no "data" of the types it captures. I propose that we should also extend this interpretation to `Unsize`. Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
ojeda
mentioned this pull request
48 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters