about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/call-generic-method-fail.rs
blob: 3ab5cc58ce3ca4571a7bb94d280651b6c9e443e8 (plain)
1
2
3
4
5
6
7
8
9
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]

pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
    *t == *t
    //~^ ERROR the trait bound `T: ~const PartialEq` is not satisfied
}

fn main() {}