mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
fix PartialEq const feature name and const_cmp tracking issue
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
)]
|
||||
#[rustc_diagnostic_item = "PartialEq"]
|
||||
#[const_trait]
|
||||
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
pub trait PartialEq<Rhs: PointeeSized = Self>: PointeeSized {
|
||||
/// Tests for `self` and `other` values to be equal, and is used by `==`.
|
||||
#[must_use]
|
||||
@@ -1809,7 +1809,7 @@ mod impls {
|
||||
macro_rules! partial_eq_impl {
|
||||
($($t:ty)*) => ($(
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
impl const PartialEq for $t {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Self) -> bool { *self == *other }
|
||||
@@ -2017,7 +2017,7 @@ fn cmp(&self, _: &!) -> Ordering {
|
||||
// & pointers
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&B> for &A
|
||||
where
|
||||
A: ~const PartialEq<B>,
|
||||
@@ -2089,7 +2089,7 @@ impl<A: PointeeSized> Eq for &A where A: Eq {}
|
||||
// &mut pointers
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&mut B> for &mut A
|
||||
where
|
||||
A: ~const PartialEq<B>,
|
||||
@@ -2159,7 +2159,7 @@ fn cmp(&self, other: &Self) -> Ordering {
|
||||
impl<A: PointeeSized> Eq for &mut A where A: Eq {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&mut B> for &A
|
||||
where
|
||||
A: ~const PartialEq<B>,
|
||||
@@ -2175,7 +2175,7 @@ fn ne(&self, other: &&mut B) -> bool {
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&B> for &mut A
|
||||
where
|
||||
A: ~const PartialEq<B>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![feature(const_type_id)]
|
||||
#![feature(generic_const_exprs)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![feature(const_type_id, const_trait_impl)]
|
||||
#![feature(const_type_id, const_trait_impl, const_cmp)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![feature(const_type_id, const_trait_impl)]
|
||||
#![feature(const_type_id, const_trait_impl, const_cmp)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//@ normalize-stderr: "0x(ff)+" -> "<u128::MAX>"
|
||||
|
||||
#![feature(const_type_id, const_trait_impl)]
|
||||
#![feature(const_type_id, const_trait_impl, const_cmp)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![feature(const_type_id, const_trait_impl)]
|
||||
#![feature(const_type_id, const_trait_impl, const_cmp)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![feature(const_type_id, const_trait_impl)]
|
||||
#![feature(const_type_id, const_trait_impl, const_cmp)]
|
||||
|
||||
use std::any::TypeId;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#![feature(const_type_id)]
|
||||
#![feature(const_type_name)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_cmp)]
|
||||
|
||||
use std::any::{self, TypeId};
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
const fn f(a: &u8, b: &u8) -> bool {
|
||||
//~^ HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
//~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
//~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
//~^ HELP: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
//~| HELP: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
//~| HELP: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
a == b
|
||||
//~^ ERROR: cannot call conditionally-const operator in constant functions
|
||||
//~| ERROR: `PartialEq` is not yet stable as a const trait
|
||||
|
||||
@@ -19,9 +19,9 @@ error: `PartialEq` is not yet stable as a const trait
|
||||
LL | a == b
|
||||
| ^^^^^^
|
||||
|
|
||||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
help: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
|
|
||||
LL + #![feature(const_trait_impl)]
|
||||
LL + #![feature(const_cmp)]
|
||||
|
|
||||
|
||||
error[E0658]: cannot call conditionally-const operator in constant functions
|
||||
@@ -45,9 +45,9 @@ error: `PartialEq` is not yet stable as a const trait
|
||||
LL | a == b
|
||||
| ^^^^^^
|
||||
|
|
||||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
help: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
|
|
||||
LL + #![feature(const_trait_impl)]
|
||||
LL + #![feature(const_cmp)]
|
||||
|
|
||||
|
||||
error[E0658]: cannot call conditionally-const operator in constant functions
|
||||
@@ -71,9 +71,9 @@ error: `PartialEq` is not yet stable as a const trait
|
||||
LL | if l == r {
|
||||
| ^^^^^^
|
||||
|
|
||||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
||||
help: add `#![feature(const_cmp)]` to the crate attributes to enable
|
||||
|
|
||||
LL + #![feature(const_trait_impl)]
|
||||
LL + #![feature(const_cmp)]
|
||||
|
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![feature(const_trait_impl, const_ops)]
|
||||
#![feature(const_trait_impl, const_ops, const_cmp)]
|
||||
//@ check-pass
|
||||
|
||||
struct Int(i32);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
#[const_trait]
|
||||
trait MyPartialEq {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
|
||||
*t == *t
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(derive_const)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_trait_impl, const_cmp)]
|
||||
|
||||
#[derive_const(PartialEq)]
|
||||
pub struct Reverse<T>(T);
|
||||
|
||||
Reference in New Issue
Block a user