]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / ui / suggestions / type-mismatch-struct-field-shorthand.fixed
1 // run-rustfix
2 #![allow(dead_code)]
3
4 struct RGB { r: f64, g: f64, b: f64 }
5
6 fn main() {
7     let (r, g, b): (f32, f32, f32) = (0., 0., 0.);
8     let _ = RGB { r: r.into(), g: g.into(), b: b.into() };
9     //~^ ERROR mismatched types
10     //~| ERROR mismatched types
11     //~| ERROR mismatched types
12 }