2021-04-25 18:42:53 +02:00
|
|
|
#![feature(const_fn_trait_bound)]
|
2020-11-22 04:19:46 +01:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
#![feature(const_trait_bound_opt_out)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
pub const fn equals_self<T: ?const PartialEq>(t: &T) -> bool {
|
|
|
|
*t == *t
|
|
|
|
//~^ ERROR calls in constant functions are limited to constant functions
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|