rust/src/test/ui/rfc-2632-const-trait-impl/call-generic-in-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
258 B
Rust
Raw Normal View History

// check-pass
#![feature(const_trait_impl)]
trait MyPartialEq {
fn eq(&self, other: &Self) -> bool;
}
2021-08-25 10:21:55 -05:00
impl<T: ~const PartialEq> const MyPartialEq for T {
fn eq(&self, other: &Self) -> bool {
PartialEq::eq(self, other)
}
}
fn main() {}