blob: e81e0d1e571c32283e6ad127683f2c8fb97d363c (
plain)
1
2
3
4
5
6
7
8
9
10
|
#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
//~^ ERROR can't compare
//~| ERROR cannot call non-const
}
fn main() {}
|