Add Sized supertrait for CoerceUnsized and DispatchFromDyn

This commit is contained in:
Alice Ryhl
2026-04-07 08:42:09 +00:00
parent c2efcc4ae0
commit 4e75261442
+2 -2
View File
@@ -33,7 +33,7 @@
/// [nomicon-coerce]: ../../nomicon/coercions.html
#[unstable(feature = "coerce_unsized", issue = "18598")]
#[lang = "coerce_unsized"]
pub trait CoerceUnsized<T: PointeeSized> {
pub trait CoerceUnsized<T: PointeeSized>: Sized {
// Empty.
}
@@ -116,7 +116,7 @@ impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for *
/// [^1]: Formerly known as *object safety*.
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
#[lang = "dispatch_from_dyn"]
pub trait DispatchFromDyn<T> {
pub trait DispatchFromDyn<T>: Sized {
// Empty.
}