-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.
Description
Location
https://doc.rust-lang.org/std/primitive.slice.html#method.fill
Summary
slice::fill
has an alias memset
which implies it can be used when self
's underlying memory is uninitialized.
The description for slice::fill
is very short and does not mention this use case, so it seems unclear if this is intended behaviour or not. Some external discussions already mention the function as a safe way to initialize memory with a T: Clone
type.
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-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.