Stabilize feature const_ordering
This commit is contained in:
parent
5fac991bf6
commit
89fc3fb93b
3 changed files with 2 additions and 5 deletions
|
@ -356,7 +356,7 @@ impl Ordering {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[rustc_const_unstable(feature = "const_ordering", issue = "76113")]
|
#[rustc_const_stable(feature = "const_ordering", since = "1.47.0")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub const fn reverse(self) -> Ordering {
|
pub const fn reverse(self) -> Ordering {
|
||||||
match self {
|
match self {
|
||||||
|
@ -395,7 +395,7 @@ impl Ordering {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[rustc_const_unstable(feature = "const_ordering", issue = "76113")]
|
#[rustc_const_stable(feature = "const_ordering", since = "1.47.0")]
|
||||||
#[stable(feature = "ordering_chaining", since = "1.17.0")]
|
#[stable(feature = "ordering_chaining", since = "1.17.0")]
|
||||||
pub const fn then(self, other: Ordering) -> Ordering {
|
pub const fn then(self, other: Ordering) -> Ordering {
|
||||||
match self {
|
match self {
|
||||||
|
|
|
@ -86,7 +86,6 @@
|
||||||
#![feature(const_ptr_offset_from)]
|
#![feature(const_ptr_offset_from)]
|
||||||
#![feature(const_raw_ptr_comparison)]
|
#![feature(const_raw_ptr_comparison)]
|
||||||
#![feature(const_result)]
|
#![feature(const_result)]
|
||||||
#![feature(const_ordering)]
|
|
||||||
#![feature(const_slice_from_raw_parts)]
|
#![feature(const_slice_from_raw_parts)]
|
||||||
#![feature(const_slice_ptr_len)]
|
#![feature(const_slice_ptr_len)]
|
||||||
#![feature(const_size_of_val)]
|
#![feature(const_size_of_val)]
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// run-pass
|
// run-pass
|
||||||
|
|
||||||
#![feature(const_ordering)]
|
|
||||||
|
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
// the following methods of core::cmp::Ordering are const:
|
// the following methods of core::cmp::Ordering are const:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue