[Clippy] Swap repeat_vec_with_capacity
to use diagnostic item inste… · qinheping/verify-rust-std@08b676d (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
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 | } |