Closed
Description
The code:
struct Thing;
impl Thing {
fn takes_unit(&self, u: ()) { u }
fn func(&self) {
self.takes_unit()
}
}
Produces a malformed "help" message:
|
3 | fn takes_unit(&self, u: ()) { u }
| --------------------------------- defined here
...
6 | self.takes_unit()
| ^^^^^^^^^^
|
help: expected the unit value `()`. You can create one with a pair of parenthesis
|
6 | self.takes_uni()t()
| ^^