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] {
188
188
///
189
189
/// Note that a range created from [`slice::as_ptr_range`] fulfills these requirements.
190
190
///
191
+ /// # Panics
192
+ ///
193
+ /// This function panics if `T` is a Zero-Sized Type (“ZST”).
194
+ ///
191
195
/// # Caveat
192
196
///
193
197
/// 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] {
247
251
///
248
252
/// Note that a range created from [`slice::as_mut_ptr_range`] fulfills these requirements.
249
253
///
254
+ /// # Panics
255
+ ///
256
+ /// This function panics if `T` is a Zero-Sized Type (“ZST”).
257
+ ///
250
258
/// # Examples
251
259
///
252
260
/// ```
You can’t perform that action at this time.
0 commit comments