rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.87k stars 12.77k forks source link

Tracking Issue for `const_copy_from_slice` #131415

Open okaneco opened 1 month ago

okaneco commented 1 month ago

Feature gate: #![feature(const_copy_from_slice)]

This is a tracking issue for using slice::copy_from_slice in const.

Public API

impl<T> [T] {
    pub const fn copy_from_slice(&mut self, src: &[T])
    where
        T: Copy;
}

Steps / History

Unresolved Questions

bjoernager commented 1 month ago

The referenced function should be <[T]>::copy_from_slice (method of [T]) instead of slice::copy_from_slice (function in core::slice).