diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-09-18 21:53:28 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-09-19 13:13:42 +0100 |
| commit | 15240a93c984fbd0f061066914547d12ce9e891c (patch) | |
| tree | 3fd239ea9542db412be454fc579eaf3b9e48bac8 /library | |
| parent | 846ae57fc1853949ff95c537023ad9b4dad11504 (diff) | |
| download | rust-15240a93c984fbd0f061066914547d12ce9e891c.tar.gz rust-15240a93c984fbd0f061066914547d12ce9e891c.zip | |
[Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item instead of path
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 29ddf939499..a7e736299be 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -477,6 +477,7 @@ impl<T> Vec<T> { #[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) } |
