Files
rust/tests/ui/traits/const-traits/call-generic-method-fail.rs

10 lines
231 B
Rust
Raw Normal View History

2024-06-30 17:08:45 +00:00
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl, const_cmp)]
2021-08-25 14:30:09 +00:00
pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
*t == *t
//~^ ERROR the trait bound `T: [const] PartialEq` is not satisfied
}
fn main() {}