rust/tests/ui/traits/const-traits/call-generic-method-fail.rs
2024-11-03 18:59:31 +00:00

10 lines
217 B
Rust

//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
//~^ ERROR cannot call non-const operator in constant functions
}
fn main() {}