blob: 6bc04ff757eefa8e5ca7b7df5a85c6bb32bee3ad [file]
//@ revisions: old-solver next-solver
//@[next-solver] compile-flags: -Znext-solver
//@ run-pass
//@ run-rustfix
fn foo(_: impl Into<f32>) {}
fn main() {
foo(1.0_f32);
//~^ WARN falling back to `f32`
//~| WARN this was previously accepted
foo(-(2.5_f32));
//~^ WARN falling back to `f32`
//~| WARN this was previously accepted
foo(1e5_f32);
//~^ WARN falling back to `f32`
//~| WARN this was previously accepted
foo(0_f32);
//~^ WARN falling back to `f32`
//~| WARN this was previously accepted
foo(4f32); // no warning
let x = -4.0_f32;
//~^ WARN falling back to `f32`
//~| WARN this was previously accepted
foo(x);
}