Skip to content

Commit c523078

Browse files
committed
fix coerce unsized impl
1 parent 2d9827f commit c523078

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/type-coercions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,9 @@ r[coerce.unsized.composite]
221221
* T is not part of the type of any other fields.
222222

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

228229
> [!NOTE]

0 commit comments

Comments
 (0)