diff options
Diffstat (limited to 'src/test/ui/suggestions/type-mismatch-struct-field-shorthand.fixed')
-rw-r--r-- | src/test/ui/suggestions/type-mismatch-struct-field-shorthand.fixed | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.fixed b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.fixed new file mode 100644 index 000000000..91758c0b2 --- /dev/null +++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.fixed @@ -0,0 +1,12 @@ +// run-rustfix +#![allow(dead_code)] + +struct RGB { r: f64, g: f64, b: f64 } + +fn main() { + let (r, g, b): (f32, f32, f32) = (0., 0., 0.); + let _ = RGB { r: r.into(), g: g.into(), b: b.into() }; + //~^ ERROR mismatched types + //~| ERROR mismatched types + //~| ERROR mismatched types +} |