We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45d050c commit f7ceb1aCopy full SHA for f7ceb1a
src/librustc_typeck/check/cast.rs
@@ -613,6 +613,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
613
(Int(CEnum), Int(_)) => Ok(CastKind::EnumCast),
614
(Int(Char) | Int(Bool), Int(_)) => Ok(CastKind::PrimIntCast),
615
616
+ (Float, Int(_)) if std::env::var_os("RUSTC_BOOTSTRAP").is_none() => Err(CastError::IllegalCast),
617
(Int(_) | Float, Int(_) | Float) => Ok(CastKind::NumericCast),
618
}
619
0 commit comments