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 09:30:09 -05:00
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
2021-12-09 11:10:05 -06:00
//~^ ERROR cannot call non-const operator
}
fn main() {}