Skip to content

Commit d52c362

Browse files
committed
Clarify that slices don't just point to arrays
Fixes #23632
1 parent ecf8c64 commit d52c362

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libstd/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
//!
4141
//! ## Vectors, slices and strings
4242
//!
43-
//! The common container type, `Vec`, a growable vector backed by an
44-
//! array, lives in the [`vec`](vec/index.html) module. References to
45-
//! arrays, `&[T]`, more commonly called "slices", are built-in types
46-
//! for which the [`slice`](slice/index.html) module defines many
47-
//! methods.
43+
//! The common container type, `Vec`, a growable vector backed by an array,
44+
//! lives in the [`vec`](vec/index.html) module. Contiguous, unsized regions
45+
//! of memory, `[T]`, commonly called "slices", and their borrowed versions,
46+
//! `&[T]`, commonly called "borrowed slices", are built-in types for which the
47+
//! for which the [`slice`](slice/index.html) module defines many methods.
4848
//!
4949
//! `&str`, a UTF-8 string, is a built-in type, and the standard library
5050
//! defines methods for it on a variety of traits in the

0 commit comments

Comments
 (0)