Skip PhantomData in Unsize checks by dingxiangfei2009 · Pull Request #149968 · rust-lang/rust

@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

Dec 14, 2025

@theemathas theemathas added the T-types

Relevant to the types team, which will review and decide on the PR/issue.

label

Dec 14, 2025

@theemathas theemathas added the needs-fcp

This change is insta-stable, or significant enough to need a team FCP to proceed.

label

Dec 14, 2025

@lcnr lcnr added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Dec 15, 2025

BoxyUwU

@jackh726 jackh726 added T-lang

Relevant to the language team

and removed 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

Dec 15, 2025

@dingxiangfei2009

This 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 ojeda mentioned this pull request

Jan 19, 2026

48 tasks