rust/tests/ui/traits/const-traits/call-generic-in-impl.rs

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

17 lines
320 B
Rust
Raw Normal View History

2024-06-21 11:57:24 +00:00
//@ known-bug: #110395
// FIXME(const_trait_impl) check-pass
#![feature(const_trait_impl)]
2022-08-28 06:27:31 +00:00
#[const_trait]
trait MyPartialEq {
fn eq(&self, other: &Self) -> bool;
}
2021-08-25 15:21:55 +00:00
impl<T: ~const PartialEq> const MyPartialEq for T {
fn eq(&self, other: &Self) -> bool {
PartialEq::eq(self, other)
}
}
fn main() {}