From 9bcc98818c9b59dd0106aed95c4349c2c8ecdc48 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 11 Apr 2024 18:01:26 -0400 Subject: Remove `From` impls for unstable types that break inference Adding additional `From` implementations that fit `f32::from()` broke inference. Remove these for now. Fixes: --- tests/ui/inference/untyped-primitives.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/ui/inference/untyped-primitives.rs (limited to 'tests') 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); +} -- cgit 1.4.1-3-g733a5