]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
Make const/fn return params more suggestable
[rust.git] / tests / ui / suggestions / type-mismatch-struct-field-shorthand.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
3    |
4 LL |     let _ = RGB { r, g, b };
5    |                   ^ expected `f64`, found `f32`
6    |
7 help: you can convert an `f32` to an `f64`
8    |
9 LL |     let _ = RGB { r: r.into(), g, b };
10    |                   ++  +++++++
11
12 error[E0308]: mismatched types
13   --> $DIR/type-mismatch-struct-field-shorthand.rs:8:22
14    |
15 LL |     let _ = RGB { r, g, b };
16    |                      ^ expected `f64`, found `f32`
17    |
18 help: you can convert an `f32` to an `f64`
19    |
20 LL |     let _ = RGB { r, g: g.into(), b };
21    |                      ++  +++++++
22
23 error[E0308]: mismatched types
24   --> $DIR/type-mismatch-struct-field-shorthand.rs:8:25
25    |
26 LL |     let _ = RGB { r, g, b };
27    |                         ^ expected `f64`, found `f32`
28    |
29 help: you can convert an `f32` to an `f64`
30    |
31 LL |     let _ = RGB { r, g, b: b.into() };
32    |                         ++  +++++++
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0308`.