rust/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs

10 lines
227 B
Rust
Raw Normal View History

#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]
2021-08-25 09:30:09 -05:00
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
//~^ ERROR calls in constant functions are limited to constant functions
}
fn main() {}