summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs')
-rw-r--r--tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs
new file mode 100644
index 000000000..9d3a17a72
--- /dev/null
+++ b/tests/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
+}