Closed
Description
fn foo() {}
fn bar() {}
fn main() {
let mut x = foo;
x = bar;
}
The compiler should explain why foo
and bar
are not the same type and should suggest first changing x
's type to fn() -> ()
.
taken from https://twitter.com/ekuber/status/1273753857542111237