1
Fork 0

Remove check_overflow method from MiscMethods

It can be retrieved from the Session too.
This commit is contained in:
bjorn3 2024-03-30 14:25:13 +00:00
parent 22b32432ca
commit aacdce38f7
4 changed files with 1 additions and 18 deletions

View file

@ -658,7 +658,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
// with #[rustc_inherit_overflow_checks] and inlined from
// another crate (mostly core::num generic/#[inline] fns),
// while the current crate doesn't use overflow checks.
if !bx.cx().check_overflow() && msg.is_optional_overflow_check() {
if !bx.sess().overflow_checks() && msg.is_optional_overflow_check() {
const_cond = Some(expected);
}