diff options
| author | Slanterns <slanterns.w@gmail.com> | 2024-07-28 01:28:39 +0800 |
|---|---|---|
| committer | Slanterns <slanterns.w@gmail.com> | 2024-07-28 03:11:54 +0800 |
| commit | ec0b3540925af3cab9c38b0344902d48edb9d5b8 (patch) | |
| tree | 65a605b3942070103328851c2adc5c8fdb4cdd35 /src | |
| parent | 8fe0c753f23e7050b87a444b6622caf4d2272d5d (diff) | |
stabilize `is_sorted`
Diffstat (limited to 'src')
5 files changed, 6 insertions, 20 deletions
diff --git a/src/doc/unstable-book/src/library-features/is-sorted.md b/src/doc/unstable-book/src/library-features/is-sorted.md deleted file mode 100644 index e3b7dc3b28e..00000000000 --- a/src/doc/unstable-book/src/library-features/is-sorted.md +++ /dev/null @@ -1,11 +0,0 @@ -# `is_sorted` - -The tracking issue for this feature is: [#53485] - -[#53485]: https://github.com/rust-lang/rust/issues/53485 - ------------------------- - -Add the methods `is_sorted`, `is_sorted_by` and `is_sorted_by_key` to `[T]`; -add the methods `is_sorted`, `is_sorted_by` and `is_sorted_by_key` to -`Iterator`. diff --git a/src/tools/clippy/clippy_lints/src/lib.rs b/src/tools/clippy/clippy_lints/src/lib.rs index 917d9d36076..22d23a17509 100644 --- a/src/tools/clippy/clippy_lints/src/lib.rs +++ b/src/tools/clippy/clippy_lints/src/lib.rs @@ -5,7 +5,6 @@ #![feature(f128)] #![feature(f16)] #![feature(if_let_guard)] -#![feature(is_sorted)] #![feature(iter_intersperse)] #![feature(iter_partition_in_place)] #![feature(let_chains)] diff --git a/src/tools/clippy/tests/compile-test.rs b/src/tools/clippy/tests/compile-test.rs index ea3a0a93ecc..4e5120406b0 100644 --- a/src/tools/clippy/tests/compile-test.rs +++ b/src/tools/clippy/tests/compile-test.rs @@ -1,4 +1,3 @@ -#![feature(is_sorted)] #![cfg_attr(feature = "deny-warnings", deny(warnings))] #![warn(rust_2018_idioms, unused_lifetimes)] #![allow(unused_extern_crates)] diff --git a/src/tools/clippy/tests/ui/unit_return_expecting_ord.rs b/src/tools/clippy/tests/ui/unit_return_expecting_ord.rs index 59b2f7e355b..5f62157dd6d 100644 --- a/src/tools/clippy/tests/ui/unit_return_expecting_ord.rs +++ b/src/tools/clippy/tests/ui/unit_return_expecting_ord.rs @@ -2,7 +2,6 @@ #![allow(clippy::needless_return)] #![allow(clippy::unused_unit)] #![allow(clippy::useless_vec)] -#![feature(is_sorted)] struct Struct { field: isize, diff --git a/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr b/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr index b2fc8857015..329832048e8 100644 --- a/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr +++ b/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr @@ -1,11 +1,11 @@ error: this closure returns the unit type which also implements Ord - --> tests/ui/unit_return_expecting_ord.rs:19:25 + --> tests/ui/unit_return_expecting_ord.rs:18:25 | LL | structs.sort_by_key(|s| { | ^^^ | help: probably caused by this trailing semicolon - --> tests/ui/unit_return_expecting_ord.rs:21:24 + --> tests/ui/unit_return_expecting_ord.rs:20:24 | LL | double(s.field); | ^ @@ -13,25 +13,25 @@ LL | double(s.field); = help: to override `-D warnings` add `#[allow(clippy::unit_return_expecting_ord)]` error: this closure returns the unit type which also implements PartialOrd - --> tests/ui/unit_return_expecting_ord.rs:24:30 + --> tests/ui/unit_return_expecting_ord.rs:23:30 | LL | structs.is_sorted_by_key(|s| { | ^^^ | help: probably caused by this trailing semicolon - --> tests/ui/unit_return_expecting_ord.rs:26:24 + --> tests/ui/unit_return_expecting_ord.rs:25:24 | LL | double(s.field); | ^ error: this closure returns the unit type which also implements PartialOrd - --> tests/ui/unit_return_expecting_ord.rs:28:30 + --> tests/ui/unit_return_expecting_ord.rs:27:30 | LL | structs.is_sorted_by_key(|s| { | ^^^ error: this closure returns the unit type which also implements Ord - --> tests/ui/unit_return_expecting_ord.rs:39:25 + --> tests/ui/unit_return_expecting_ord.rs:38:25 | LL | structs.sort_by_key(|s| unit(s.field)); | ^^^ |
