We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50df2a0 commit 80f2692Copy full SHA for 80f2692
src/libcore/slice.rs
@@ -1368,10 +1368,14 @@ pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] {
1368
///
1369
/// The `len` argument is the number of **elements**, not the number of bytes.
1370
1371
+/// # Unsafety
1372
+///
1373
/// This function is unsafe as there is no guarantee that the given pointer is
1374
/// valid for `len` elements, nor whether the lifetime inferred is a suitable
1375
/// lifetime for the returned slice.
1376
1377
+/// `p` must be non-null, even for zero-length slices.
1378
1379
/// # Caveat
1380
1381
/// The lifetime for the returned slice is inferred from its usage. To
0 commit comments