Rollup merge of #130553 - GnomedDev:remove-clippy-paths, r=compiler-e… · qinheping/verify-rust-std@17b0e39 (original) (raw)

`@@ -416,6 +416,7 @@ impl Vec {

`

416

416

```` /// ```


`417`

`417`

`#[inline]

`

`418`

`418`

`#[rustc_const_stable(feature = "const_vec_new", since = "1.39.0")]

`

``

`419`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_new")]

`

`419`

`420`

`#[stable(feature = "rust1", since = "1.0.0")]

`

`420`

`421`

`#[must_use]

`

`421`

`422`

`pub const fn new() -> Self {

`

`@@ -476,6 +477,7 @@ impl<T> Vec<T> {

`

`476`

`477`

`#[inline]

`

`477`

`478`

`#[stable(feature = "rust1", since = "1.0.0")]

`

`478`

`479`

`#[must_use]

`

``

`480`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_with_capacity")]

`

`479`

`481`

`pub fn with_capacity(capacity: usize) -> Self {

`

`480`

`482`

`Self::with_capacity_in(capacity, Global)

`

`481`

`483`

`}

`

`@@ -1545,6 +1547,7 @@ impl<T, A: Allocator> Vec<T, A> {

`

`1545`

`1547`

```` /// ```

1546

1548

`#[inline]

`

1547

1549

`#[stable(feature = "vec_as_slice", since = "1.7.0")]

`

``

1550

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_as_slice")]

`

1548

1551

`pub fn as_slice(&self) -> &[T] {

`

1549

1552

`self

`

1550

1553

`}

`

`@@ -1562,6 +1565,7 @@ impl<T, A: Allocator> Vec<T, A> {

`

1562

1565

```` /// ```


`1563`

`1566`

`#[inline]

`

`1564`

`1567`

`#[stable(feature = "vec_as_slice", since = "1.7.0")]

`

``

`1568`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_as_mut_slice")]

`

`1565`

`1569`

`pub fn as_mut_slice(&mut self) -> &mut [T] {

`

`1566`

`1570`

`self

`

`1567`

`1571`

`}

`

`@@ -2380,6 +2384,7 @@ impl<T, A: Allocator> Vec<T, A> {

`

`2380`

`2384`

`/// Takes *O*(1) time.

`

`2381`

`2385`

`#[inline]

`

`2382`

`2386`

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

`2387`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_pop")]

`

`2383`

`2388`

`pub fn pop(&mut self) -> Option<T> {

`

`2384`

`2389`

`if self.len == 0 {

`

`2385`

`2390`

`None

`

`@@ -2573,6 +2578,7 @@ impl<T, A: Allocator> Vec<T, A> {

`

`2573`

`2578`

`/// assert!(!v.is_empty());

`

`2574`

`2579`

```` /// ```

2575

2580

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

2581

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_is_empty")]

`

2576

2582

`pub fn is_empty(&self) -> bool {

`

2577

2583

`self.len() == 0

`

2578

2584

`}

`

`@@ -3044,6 +3050,7 @@ impl<T: PartialEq, A: Allocator> Vec<T, A> {

`

3044

3050

`#[doc(hidden)]

`

3045

3051

`#[cfg(not(no_global_oom_handling))]

`

3046

3052

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

3053

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "vec_from_elem")]

`

3047

3054

`pub fn from_elem<T: Clone>(elem: T, n: usize) -> Vec {

`

3048

3055

` ::from_elem(elem, n, Global)

`

3049

3056

`}

`