From 91fcdde51b477e8def5e8cca2807a2dc12c8f06d Mon Sep 17 00:00:00 2001 From: Petr Portnov Date: Mon, 20 Nov 2023 18:33:55 +0300 Subject: [PATCH] chore(GH-118094): explicitly mark `_elem` as unused Signed-off-by: Petr Portnov --- library/alloc/src/vec/spec_from_elem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/vec/spec_from_elem.rs b/library/alloc/src/vec/spec_from_elem.rs index 4e4150d9435..63225b41cbd 100644 --- a/library/alloc/src/vec/spec_from_elem.rs +++ b/library/alloc/src/vec/spec_from_elem.rs @@ -64,7 +64,7 @@ fn from_elem(elem: u8, n: usize, alloc: A) -> Vec { // but this cannot be implemented currently impl SpecFromElem for () { #[inline] - fn from_elem(elem: (), n: usize, alloc: A) -> Vec<(), A> { + fn from_elem(_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