[Clippy] Swap manual_while_let_some to use diagnostic items instead… · qinheping/verify-rust-std@7bc30a7 (original) (raw)

Original file line number Diff line number Diff line change
@@ -2384,6 +2384,7 @@ impl<T, A: Allocator> Vec<T, A> {
2384 2384 /// Takes *O*(1) time.
2385 2385 #[inline]
2386 2386 #[stable(feature = "rust1", since = "1.0.0")]
2387 +#[cfg_attr(not(test), rustc_diagnostic_item = "vec_pop")]
2387 2388 pub fn pop(&mut self) -> Option<T> {
2388 2389 if self.len == 0 {
2389 2390 None
@@ -2577,6 +2578,7 @@ impl<T, A: Allocator> Vec<T, A> {
2577 2578 /// assert!(!v.is_empty());
2578 2579 /// ```
2579 2580 #[stable(feature = "rust1", since = "1.0.0")]
2581 +#[cfg_attr(not(test), rustc_diagnostic_item = "vec_is_empty")]
2580 2582 pub fn is_empty(&self) -> bool {
2581 2583 self.len() == 0
2582 2584 }