]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/impl-method-mismatch.rs
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
[rust.git] / src / test / ui / traits / impl-method-mismatch.rs
1 trait Mumbo {
2     fn jumbo(&self, x: &usize) -> usize;
3 }
4
5 impl Mumbo for usize {
6     // Cannot have a larger effect than the trait:
7     unsafe fn jumbo(&self, x: &usize) { *self + *x; }
8     //~^ ERROR method `jumbo` has an incompatible type for trait
9     //~| expected fn pointer `fn
10     //~| found fn pointer `unsafe fn
11 }
12
13 fn main() {}