2021-07-19 05:50:47 -05:00
|
|
|
// check-pass
|
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
2022-08-28 01:27:31 -05:00
|
|
|
#[const_trait]
|
2021-07-19 05:50:47 -05:00
|
|
|
trait MyPartialEq {
|
|
|
|
fn eq(&self, other: &Self) -> bool;
|
|
|
|
}
|
|
|
|
|
2021-08-25 10:21:55 -05:00
|
|
|
impl<T: ~const PartialEq> const MyPartialEq for T {
|
2021-07-19 05:50:47 -05:00
|
|
|
fn eq(&self, other: &Self) -> bool {
|
|
|
|
PartialEq::eq(self, other)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|