Closed
Description
fn main() {
let x: A = B;
}
struct A;
struct B;
impl From<B> for A {
fn from(_: B) -> Self { A }
}
the current output is
error[E0308]: mismatched types
--> src/main.rs:2:16
|
2 | let x: A = B;
| - ^ expected struct `A`, found struct `B`
| |
| expected due to this
but we should probe for possible Into
and From
impls and suggest them if reasonable.