You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Special case Into suggestion to look for Fromimpls
When we encounter a blanket `<Ty as Into<Other>` `impl`, look at the `From` `impl`s so that we can suggest the appropriate `Other`:
```
error[E0284]: type annotations needed
--> $DIR/issue-70082.rs:7:33
|
LL | let y: f64 = 0.01f64 * 1i16.into();
| - ^^^^
| |
| type must be known at this point
|
= note: cannot satisfy `<f64 as Mul<_>>::Output == f64`
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<i32>>::into(1i16);
| +++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<i64>>::into(1i16);
| +++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<i128>>::into(1i16);
| ++++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<isize>>::into(1i16);
| +++++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<f32>>::into(1i16);
| +++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<f64>>::into(1i16);
| +++++++++++++++++++++++++ ~
help: try using a fully qualified path to specify the expected types
|
LL | let y: f64 = 0.01f64 * <i16 as Into<AtomicI16>>::into(1i16);
| +++++++++++++++++++++++++++++++ ~
```
0 commit comments