mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
16 lines
285 B
Rust
16 lines
285 B
Rust
![]() |
// check-pass
|
||
|
#![feature(const_fn_trait_bound)]
|
||
|
#![feature(const_trait_impl)]
|
||
|
|
||
|
trait MyPartialEq {
|
||
|
fn eq(&self, other: &Self) -> bool;
|
||
|
}
|
||
|
|
||
|
impl<T: PartialEq> const MyPartialEq for T {
|
||
|
fn eq(&self, other: &Self) -> bool {
|
||
|
PartialEq::eq(self, other)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {}
|