]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
Auto merge of #106948 - cuviper:ci-mingw-check, r=nikic
[rust.git] / tests / ui / suggestions / type-mismatch-struct-field-shorthand-2.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:19
3    |
4 LL |     let _ = RGB { r, g, c };
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, c };
10    |                   ++  +++++++
11
12 error[E0308]: mismatched types
13   --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:22
14    |
15 LL |     let _ = RGB { r, g, c };
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(), c };
21    |                      ++  +++++++
22
23 error[E0560]: struct `RGB` has no field named `c`
24   --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:25
25    |
26 LL |     let _ = RGB { r, g, c };
27    |                         ^ help: a field with a similar name exists: `b`
28
29 error: aborting due to 3 previous errors
30
31 Some errors have detailed explanations: E0308, E0560.
32 For more information about an error, try `rustc --explain E0308`.