rust/tests/ui/traits/const-traits/call-generic-method-nonconst-bound.rs
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

18 lines
222 B
Rust

//@ check-pass
struct S;
impl PartialEq for S {
fn eq(&self, _: &S) -> bool {
true
}
}
const fn equals_self<T: PartialEq>(t: &T) -> bool {
true
}
pub const EQ: bool = equals_self(&S);
fn main() {}