From 08b676d07d8ba4a0e5a3422db9bf96a96fcc24fb Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Wed, 18 Sep 2024 21:53:28 +0100 Subject: [PATCH] [Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item instead of path --- alloc/src/vec/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/alloc/src/vec/mod.rs b/alloc/src/vec/mod.rs index 29ddf939499a8..a7e736299bed6 100644 --- a/alloc/src/vec/mod.rs +++ b/alloc/src/vec/mod.rs @@ -477,6 +477,7 @@ impl Vec { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[must_use] + #[cfg_attr(not(test), rustc_diagnostic_item = "vec_with_capacity")] pub fn with_capacity(capacity: usize) -> Self { Self::with_capacity_in(capacity, Global) }