diff options
Diffstat (limited to 'src/test/ui/suggestions/type-mismatch-struct-field-shorthand.rs')
-rw-r--r-- | src/test/ui/suggestions/type-mismatch-struct-field-shorthand.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.rs b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.rs new file mode 100644 index 000000000..9d3a17a72 --- /dev/null +++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.rs @@ -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, g, b }; + //~^ ERROR mismatched types + //~| ERROR mismatched types + //~| ERROR mismatched types +} |