-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #123830 - tgross35:f16-f128-from-inference-fix, r=Nil…
…strieb 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. I added a test to make sure this doesn't quietly change in the future, even though the behavior is not technically guaranteed #123824 (comment) Fixes: <#123824>
- Loading branch information
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |