-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-bugCategory: This is a bug.Category: This is a bug.F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
After this rollup we started seeing the following compile failure:
fn main() {
let x = f32::from(3.14);
}
error[E0277]: the trait bound `f32: From<f64>` is not satisfied
--> /tmp/repro.rs:2:13
|
16 | let x = f32::from(3.14);
| ^^^ the trait `From<f64>` is not implemented for `f32`
|
= help: the following other types implement trait `From<T>`:
<f32 as From<bool>>
<f32 as From<f16>>
<f32 as From<i16>>
<f32 as From<i8>>
<f32 as From<u16>>
<f32 as From<u8>>
error: aborting due to 1 previous error
I repro'd this locally on aa6a697 but we have CI that runs on every commit so we're fairly sure that it started with 4435924. Of the changes in that rollup #122470 is the only one that seemed to touch float stuff, but I'm not sure how adding some extra impls for f16
and f128
would break inference in this case.
Metadata
Metadata
Assignees
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-bugCategory: This is a bug.Category: This is a bug.F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.