[Clippy] Swap repeat_vec_with_capacity to use diagnostic item inste… · qinheping/verify-rust-std@08b676d (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 08b676d

[Clippy] Swap repeat_vec_with_capacity to use diagnostic item instead of path

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 0 deletions

Original file line number Diff line number Diff line change
@@ -477,6 +477,7 @@ impl Vec {
477 477 #[inline]
478 478 #[stable(feature = "rust1", since = "1.0.0")]
479 479 #[must_use]
480 +#[cfg_attr(not(test), rustc_diagnostic_item = "vec_with_capacity")]
480 481 pub fn with_capacity(capacity: usize) -> Self {
481 482 Self::with_capacity_in(capacity, Global)
482 483 }