2025-06-20 14:44:20 +00:00
|
|
|
//@ check-pass
|
2025-07-11 17:35:57 +02:00
|
|
|
#![feature(const_trait_impl, const_cmp)]
|
2021-07-19 18:50:47 +08:00
|
|
|
|
2022-08-28 06:27:31 +00:00
|
|
|
#[const_trait]
|
2021-07-19 18:50:47 +08:00
|
|
|
trait MyPartialEq {
|
|
|
|
|
fn eq(&self, other: &Self) -> bool;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 12:08:45 +00:00
|
|
|
impl<T: [const] PartialEq> const MyPartialEq for T {
|
2021-07-19 18:50:47 +08:00
|
|
|
fn eq(&self, other: &Self) -> bool {
|
|
|
|
|
PartialEq::eq(self, other)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|