Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix coerce unsized impl
  • Loading branch information
lcnr committed Jul 17, 2025
commit 79f2fd50b9c3df89f9fb62d23ed1ccfa68d24562
5 changes: 3 additions & 2 deletions src/type-coercions.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ r[coerce.unsized.composite]
* T is not part of the type of any other fields.

r[coerce.unsized.pointer]
Additionally, a type `Foo<T>` can implement `CoerceUnsized<Foo<U>>` when `T`
implements `Unsize<U>` or `CoerceUnsized<Foo<U>>`. This allows it to provide an
Additionally, a type `Foo<T>` can implement `CoerceUnsized<Foo<U>>` if there exists
exactly one non-`PhantomData` field which depends on the changed generic parameters
for which `Field<T>: CoerceUnsized<Field<U>>` holds. This allows it to provide an
unsized coercion to `Foo<U>`.

> [!NOTE]
Expand Down