Skip to content

Commit cbabb1b

Browse files
committed
Remove warning about f64->f32 cast being potential UB
As discussed in #15536, the LLVM documentation incorrect described overflowing f64->f32 casts as being undefined behavior. LLVM never treated them as such, and the documentation has been adjusted in https://reviews.llvm.org/rL329065. As such, this warning can now be removed. Closes #49622.
1 parent fb730d7 commit cbabb1b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/librustc_typeck/check/demand.rs

-4
Original file line numberDiff line numberDiff line change
@@ -502,10 +502,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
502502
&format!("{}, producing the closest possible value",
503503
msg),
504504
cast_suggestion);
505-
err.warn("casting here will cause undefined behavior if the value is \
506-
finite but larger or smaller than the largest or smallest \
507-
finite value representable by `f32` (this is a bug and will be \
508-
fixed)");
509505
}
510506
true
511507
}

0 commit comments

Comments
 (0)