Add unstable const_ordering
feature, and some tests.
This commit is contained in:
parent
6b0d44e92a
commit
5fac991bf6
3 changed files with 20 additions and 0 deletions
|
@ -356,6 +356,7 @@ impl Ordering {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[rustc_const_unstable(feature = "const_ordering", issue = "76113")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const fn reverse(self) -> Ordering {
|
||||
match self {
|
||||
|
@ -394,6 +395,7 @@ impl Ordering {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[rustc_const_unstable(feature = "const_ordering", issue = "76113")]
|
||||
#[stable(feature = "ordering_chaining", since = "1.17.0")]
|
||||
pub const fn then(self, other: Ordering) -> Ordering {
|
||||
match self {
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
#![feature(const_ptr_offset_from)]
|
||||
#![feature(const_raw_ptr_comparison)]
|
||||
#![feature(const_result)]
|
||||
#![feature(const_ordering)]
|
||||
#![feature(const_slice_from_raw_parts)]
|
||||
#![feature(const_slice_ptr_len)]
|
||||
#![feature(const_size_of_val)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue