File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
188188///
189189/// Note that a range created from [`slice::as_ptr_range`] fulfills these requirements.
190190///
191+ /// # Panics
192+ ///
193+ /// This function panics if `T` is a Zero-Sized Type (“ZST”).
194+ ///
191195/// # Caveat
192196///
193197/// The lifetime for the returned slice is inferred from its usage. To
@@ -247,6 +251,10 @@ pub const unsafe fn from_ptr_range<'a, T>(range: Range<*const T>) -> &'a [T] {
247251///
248252/// Note that a range created from [`slice::as_mut_ptr_range`] fulfills these requirements.
249253///
254+ /// # Panics
255+ ///
256+ /// This function panics if `T` is a Zero-Sized Type (“ZST”).
257+ ///
250258/// # Examples
251259///
252260/// ```
You can’t perform that action at this time.
0 commit comments