stabilize is_sorted

This commit is contained in:
Slanterns 2024-07-28 01:28:39 +08:00
parent eb2fc42ef9
commit 0812732cfc
4 changed files with 6 additions and 9 deletions

View File

@ -5,7 +5,6 @@
#![feature(f128)] #![feature(f128)]
#![feature(f16)] #![feature(f16)]
#![feature(if_let_guard)] #![feature(if_let_guard)]
#![feature(is_sorted)]
#![feature(iter_intersperse)] #![feature(iter_intersperse)]
#![feature(iter_partition_in_place)] #![feature(iter_partition_in_place)]
#![feature(let_chains)] #![feature(let_chains)]

View File

@ -1,4 +1,3 @@
#![feature(is_sorted)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))] #![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(rust_2018_idioms, unused_lifetimes)] #![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(unused_extern_crates)] #![allow(unused_extern_crates)]

View File

@ -2,7 +2,6 @@
#![allow(clippy::needless_return)] #![allow(clippy::needless_return)]
#![allow(clippy::unused_unit)] #![allow(clippy::unused_unit)]
#![allow(clippy::useless_vec)] #![allow(clippy::useless_vec)]
#![feature(is_sorted)]
struct Struct { struct Struct {
field: isize, field: isize,

View File

@ -1,11 +1,11 @@
error: this closure returns the unit type which also implements Ord 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| { LL | structs.sort_by_key(|s| {
| ^^^ | ^^^
| |
help: probably caused by this trailing semicolon 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); LL | double(s.field);
| ^ | ^
@ -13,25 +13,25 @@ LL | double(s.field);
= help: to override `-D warnings` add `#[allow(clippy::unit_return_expecting_ord)]` = help: to override `-D warnings` add `#[allow(clippy::unit_return_expecting_ord)]`
error: this closure returns the unit type which also implements PartialOrd 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| { LL | structs.is_sorted_by_key(|s| {
| ^^^ | ^^^
| |
help: probably caused by this trailing semicolon 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); LL | double(s.field);
| ^ | ^
error: this closure returns the unit type which also implements PartialOrd 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| { LL | structs.is_sorted_by_key(|s| {
| ^^^ | ^^^
error: this closure returns the unit type which also implements Ord 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)); LL | structs.sort_by_key(|s| unit(s.field));
| ^^^ | ^^^