mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
16 lines
273 B
Rust
16 lines
273 B
Rust
// check-pass
|
|
#![feature(const_trait_impl)]
|
|
|
|
#[const_trait]
|
|
trait MyPartialEq {
|
|
fn eq(&self, other: &Self) -> bool;
|
|
}
|
|
|
|
impl<T: ~const PartialEq> const MyPartialEq for T {
|
|
fn eq(&self, other: &Self) -> bool {
|
|
PartialEq::eq(self, other)
|
|
}
|
|
}
|
|
|
|
fn main() {}
|