summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr')
-rw-r--r--src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
new file mode 100644
index 000000000..72c84d167
--- /dev/null
+++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
@@ -0,0 +1,36 @@
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
+ |
+LL | let _ = RGB { r, g, b };
+ | ^ expected `f64`, found `f32`
+ |
+help: you can convert an `f32` to an `f64`
+ |
+LL | let _ = RGB { r: r.into(), g, b };
+ | ++ +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-struct-field-shorthand.rs:8:22
+ |
+LL | let _ = RGB { r, g, b };
+ | ^ expected `f64`, found `f32`
+ |
+help: you can convert an `f32` to an `f64`
+ |
+LL | let _ = RGB { r, g: g.into(), b };
+ | ++ +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-struct-field-shorthand.rs:8:25
+ |
+LL | let _ = RGB { r, g, b };
+ | ^ expected `f64`, found `f32`
+ |
+help: you can convert an `f32` to an `f64`
+ |
+LL | let _ = RGB { r, g, b: b.into() };
+ | ++ +++++++
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.