-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[rustdoc]A wrong in documents about slice #45678
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Type
Fields
Give feedbackNo fields configured for issues without a type.
https://doc.rust-lang.org/std/primitive.slice.html
I think that in
let x = &mut [1, 2, 3];,xis not slice. It is just a reference for primitive type (arrary)for example:
that the second on is not a right statements.
against the definition of
let str_slice: &[&str] = &["one", "two", "three"];x = &mut[1,2,3][..]is slice type.And I think it's better to add a note.
and
these y are same.