Skip to content

Commit 6c39ebb

Browse files
authored
hybrid-array: tweak ArraySize docs, remove static bound (#976)
1 parent 316f864 commit 6c39ebb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hybrid-array/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,11 @@ impl<T, const N: usize> ArrayExt<T> for [T; N] {
605605
/// # Safety
606606
///
607607
/// `ArrayType` MUST be an array with a number of elements exactly equal to
608-
/// [`Unsigned::USIZE`].
608+
/// [`Unsigned::USIZE`]. Breaking this requirement will cause undefined behavior.
609609
///
610-
/// Failure to so will cause undefined behavior.
611-
///
612-
/// NOTE: do not implement this trait yourself. It is implemented for types in
613-
/// [`typenum::consts`].
614-
pub unsafe trait ArraySize: Unsigned + 'static {
610+
/// NOTE: This trait is effectively sealed and can not be implemented by third-party crates.
611+
/// It is implemented only for a number of types defined in [`typenum::consts`].
612+
pub unsafe trait ArraySize: Unsigned {
615613
/// Array type which corresponds to this size.
616614
type ArrayType<T>: ArrayExt<T> + AsRef<[T]> + AsMut<[T]> + IntoArray<T> + IntoIterator<Item = T>;
617615
}

0 commit comments

Comments
 (0)