about summary refs log tree commit diff
path: root/tests/ui/traits/impl-method-mismatch.rs
blob: a7de5e38113727d260f115817febc987f3644ecb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ dont-require-annotations: NOTE

trait Mumbo {
    fn jumbo(&self, x: &usize) -> usize;
}

impl Mumbo for usize {
    // Cannot have a larger effect than the trait:
    unsafe fn jumbo(&self, x: &usize) { *self + *x; }
    //~^ ERROR method `jumbo` has an incompatible type for trait
    //~| NOTE expected signature `fn
    //~| NOTE found signature `unsafe fn
}

fn main() {}