2021-04-25 11:42:53 -05:00
|
|
|
#![feature(const_fn_trait_bound)]
|
2020-11-21 21:19:46 -06:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
2021-08-25 09:30:09 -05:00
|
|
|
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
|
2020-11-21 21:19:46 -06:00
|
|
|
*t == *t
|
2021-12-09 11:10:05 -06:00
|
|
|
//~^ ERROR cannot call non-const operator
|
2020-11-21 21:19:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|