From c9646b2d344ffa4221185147fa94ee32691f86a3 Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 17 Jul 2025 13:16:03 +0200 Subject: [PATCH] fix coerce unsized impl --- src/type-coercions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type-coercions.md b/src/type-coercions.md index ae60c3df96..e52182767a 100644 --- a/src/type-coercions.md +++ b/src/type-coercions.md @@ -194,7 +194,7 @@ r[coerce.unsized.composite] * T is not part of the type of any other fields. r[coerce.unsized.pointer] -Additionally, a type `Foo` can implement `CoerceUnsized>` when `T` implements `Unsize` or `CoerceUnsized>`. This allows it to provide an unsized coercion to `Foo`. +Additionally, a type `Foo` can implement `CoerceUnsized>` if there exists exactly one non-`PhantomData` field which depends on the changed generic parameters for which `Field: CoerceUnsized>` holds. This allows it to provide an unsized coercion to `Foo`. > [!NOTE] > While the definition of the unsized coercions and their implementation has been stabilized, the traits themselves are not yet stable and therefore can't be used directly in stable Rust.