diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-04-11 18:01:26 -0400 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-04-11 18:04:31 -0400 |
| commit | 9bcc98818c9b59dd0106aed95c4349c2c8ecdc48 (patch) | |
| tree | 5029350a1d69f40c6211abd6ac3f8891a90b6e30 /tests/ui/inference | |
| parent | aa6a697a1c75b0aa06954136f7641706edadc2be (diff) | |
| download | rust-9bcc98818c9b59dd0106aed95c4349c2c8ecdc48.tar.gz rust-9bcc98818c9b59dd0106aed95c4349c2c8ecdc48.zip | |
Remove `From` impls for unstable types that break inference
Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now. Fixes: <https://github.com/rust-lang/rust/issues/123824>
Diffstat (limited to 'tests/ui/inference')
| -rw-r--r-- | tests/ui/inference/untyped-primitives.rs | 9 |
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); +} |
