summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs
blob: 8df68225d44cd34c1b448fbfb39e0ea2c2ec5ff1 (plain)
1
2
3
4
5
6
7
8
9
#![feature(const_trait_impl)]

pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
    *t == *t
    //~^ ERROR can't compare
    //~| ERROR cannot call non-const
}

fn main() {}