We currently already do this when the unit struct is from the current crate:
error[E0308]: mismatched types
--> fi.rs:8:9
|
1 | struct percentage;
| ----------------- unit struct defined here
...
8 | let percentage = 4i32;
| ^^^^^^^^^^ ---- this expression has type `i32`
| |
| expected `i32`, found `percentage`
| `percentage` is interpreted as a unit struct, not a new binding
| help: introduce a new binding instead: `other_percentage`
but we must do that also when they come from other crates as well.
https://hachyderm.io/@LGUG2Z/113052067582966834
We currently already do this when the unit struct is from the current crate:
but we must do that also when they come from other crates as well.
https://hachyderm.io/@LGUG2Z/113052067582966834