Closed
Description
openedon Sep 28, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment