]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
Rollup merge of #65389 - ecstatic-morse:zero-sized-array-no-drop, r=eddyb
[rust.git] / src / test / 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    |                   ^
6    |                   |
7    |                   expected f64, found f32
8    |                   help: you can convert an `f32` to `f64`: `r: r.into()`
9
10 error[E0308]: mismatched types
11   --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:22
12    |
13 LL |     let _ = RGB { r, g, c };
14    |                      ^
15    |                      |
16    |                      expected f64, found f32
17    |                      help: you can convert an `f32` to `f64`: `g: g.into()`
18
19 error[E0560]: struct `RGB` has no field named `c`
20   --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:25
21    |
22 LL |     let _ = RGB { r, g, c };
23    |                         ^ help: a field with a similar name exists: `b`
24
25 error: aborting due to 3 previous errors
26
27 Some errors have detailed explanations: E0308, E0560.
28 For more information about an error, try `rustc --explain E0308`.