summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/bad-hex-float-lit.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/suggestions/bad-hex-float-lit.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/bad-hex-float-lit.stderr')
-rw-r--r--tests/ui/suggestions/bad-hex-float-lit.stderr48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/ui/suggestions/bad-hex-float-lit.stderr b/tests/ui/suggestions/bad-hex-float-lit.stderr
new file mode 100644
index 000000000..bc09abb1a
--- /dev/null
+++ b/tests/ui/suggestions/bad-hex-float-lit.stderr
@@ -0,0 +1,48 @@
+error[E0308]: mismatched types
+ --> $DIR/bad-hex-float-lit.rs:2:19
+ |
+LL | let _f: f32 = 0xAAf32;
+ | --- ^^^^^^^ expected `f32`, found integer
+ | |
+ | expected due to this
+ |
+help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
+ |
+LL | let _f: f32 = 0xAA as f32;
+ | ~~~~~~~~~~~
+LL | let _f: f32 = 170_f32;
+ | ~~~~~~~
+
+error[E0308]: mismatched types
+ --> $DIR/bad-hex-float-lit.rs:6:19
+ |
+LL | let _f: f32 = 0xAB_f32;
+ | --- ^^^^^^^^ expected `f32`, found integer
+ | |
+ | expected due to this
+ |
+help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
+ |
+LL | let _f: f32 = 0xAB as f32;
+ | ~~~~~~~~~~~
+LL | let _f: f32 = 171_f32;
+ | ~~~~~~~
+
+error[E0308]: mismatched types
+ --> $DIR/bad-hex-float-lit.rs:10:19
+ |
+LL | let _f: f64 = 0xFF_f64;
+ | --- ^^^^^^^^ expected `f64`, found integer
+ | |
+ | expected due to this
+ |
+help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
+ |
+LL | let _f: f64 = 0xFF as f64;
+ | ~~~~~~~~~~~
+LL | let _f: f64 = 255_f64;
+ | ~~~~~~~
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.