about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPetr Portnov <me@progrm-jarvis.ru>2023-11-20 18:33:55 +0300
committerPetr Portnov <me@progrm-jarvis.ru>2023-11-20 18:33:55 +0300
commit91fcdde51b477e8def5e8cca2807a2dc12c8f06d (patch)
treee5a752ef02a5283ea778b2ac14b3c567649d8f94
parent2fd9442afca446af8084c8b15feba2daa2fb4bb6 (diff)
downloadrust-91fcdde51b477e8def5e8cca2807a2dc12c8f06d.tar.gz
rust-91fcdde51b477e8def5e8cca2807a2dc12c8f06d.zip
chore(GH-118094): explicitly mark `_elem` as unused
Signed-off-by: Petr Portnov <me@progrm-jarvis.ru>
-rw-r--r--library/alloc/src/vec/spec_from_elem.rs2
1 files changed, 1 insertions, 1 deletions
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 @@ 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