about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/inference/untyped-primitives.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/inference/untyped-primitives.rs b/tests/ui/inference/untyped-primitives.rs
new file mode 100644
index 00000000000..8515ca79903
--- /dev/null
+++ b/tests/ui/inference/untyped-primitives.rs
@@ -0,0 +1,9 @@
+//@ check-pass
+// issue: rust-lang/rust#123824
+// This test is a sanity check and does not enforce any stable API, so may be
+// removed at a future point.
+
+fn main() {
+    let x = f32::from(3.14);
+    let y = f64::from(3.14);
+}