X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_mir%2Fborrow_check%2Fnll%2Ftype_check%2Fmod.rs;h=39019b35beb184517e8bacddcfa6990746587853;hb=62b359094f0dcebdb03e4bbc0e4934ce38d8623a;hp=5f64dfd931c8989a6f2c31f0bf1cc2c6fa742124;hpb=e40f37e39dd1cbb0b6158bf120931f6cc4a0c43b;p=rust.git diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index 5f64dfd931c..39019b35beb 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -9,6 +9,7 @@ // except according to those terms. //! This pass type-checks the MIR to ensure it is not broken. + #![allow(unreachable_code)] use borrow_check::borrow_set::BorrowSet; @@ -1467,7 +1468,7 @@ fn check_terminator( value_ty, ty, term_location.to_locations(), - ConstraintCategory::Return, + ConstraintCategory::Yield, ) { span_mirbug!( self, @@ -1545,8 +1546,7 @@ fn check_call_dest( } } None => { - // FIXME(canndrew): This is_never should probably be an is_uninhabited - if !sig.output().is_never() { + if !sig.output().conservative_is_uninhabited() { span_mirbug!(self, term, "call to converging function {:?} w/o dest", sig); } }