3 #![feature(const_fn_trait_bound)]
4 #![feature(const_trait_impl)]
5 #![feature(const_trait_bound_opt_out)]
6 #![allow(incomplete_features)]
10 impl PartialEq for S {
11 fn eq(&self, _: &S) -> bool {
16 const fn equals_self<T: ?const PartialEq>(t: &T) -> bool {
20 pub const EQ: bool = equals_self(&S);
22 // Calling `equals_self` with a type that only has a non-const impl is fine, because we opted out.