1 // FIXME(jschievink): this is not rejected correctly (only when the non-const impl is actually used)
4 #![feature(const_trait_impl)]
9 fn eq(&self, _: &S) -> bool {
14 const fn equals_self<T: PartialEq>(t: &T) -> bool {
18 // Calling `equals_self` with something that has a non-const impl should throw an error, despite
19 // it not using the impl.
21 pub const EQ: bool = equals_self(&S);