fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
595 B15 linesraw
1error[E0053]: method `jumbo` has an incompatible type for trait
2  --> $DIR/trait-impl-method-mismatch.rs:7:5
3   |
4LL |     fn jumbo(&self, x: &usize) -> usize;
5   |     ------------------------------------ type in trait
6...
7LL |     unsafe fn jumbo(&self, x: &usize) { *self + *x; }
8   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected normal fn, found unsafe fn
9   |
10   = note: expected fn pointer `fn(&usize, &usize) -> usize`
11              found fn pointer `unsafe fn(&usize, &usize)`
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0053`.