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

10 lines
196 B
Rust
Raw Normal View History

#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]
2021-08-25 14:30:09 +00:00
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
2021-12-09 17:10:05 +00:00
//~^ ERROR cannot call non-const operator
}
fn main() {}