mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
chore(GH-118094): explicitly mark _elem
as unused
Signed-off-by: Petr Portnov <me@progrm-jarvis.ru>
This commit is contained in:
parent
2fd9442afc
commit
91fcdde51b
@ -64,7 +64,7 @@ impl SpecFromElem for u8 {
|
||||
// but this cannot be implemented currently
|
||||
impl SpecFromElem for () {
|
||||
#[inline]
|
||||
fn from_elem<A: Allocator>(elem: (), n: usize, alloc: A) -> Vec<(), A> {
|
||||
fn from_elem<A: Allocator>(_elem: (), n: usize, alloc: A) -> Vec<(), A> {
|
||||
let mut v = Vec::with_capacity_in(n, alloc);
|
||||
// SAFETY: the capacity has just been set to `n` and `()`
|
||||
// is a ZST with trivial `Clone` implementation
|
||||
|
Loading…
Reference in New Issue
Block a user