File tree 1 file changed +2
-2
lines changed
compiler/rustc_mir_transform/src 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -749,15 +749,15 @@ fn sanitize_witness<'tcx>(
749
749
}
750
750
let decl_ty = tcx. normalize_erasing_regions ( param_env, decl. ty ) ;
751
751
752
- let is_inhabited = ! tcx. is_ty_uninhabited_from (
752
+ let is_uninhabited = tcx. is_ty_uninhabited_from (
753
753
tcx. parent_module ( tcx. hir ( ) . local_def_id_to_hir_id ( did. expect_local ( ) ) ) . to_def_id ( ) ,
754
754
decl_ty,
755
755
param_env,
756
756
) ;
757
757
758
758
// Sanity check that typeck knows about the type of locals which are
759
759
// live across a suspension point
760
- if is_inhabited || allowed. contains ( & decl_ty) || allowed_upvars. contains ( & decl_ty) {
760
+ if is_uninhabited || allowed. contains ( & decl_ty) || allowed_upvars. contains ( & decl_ty) {
761
761
// This type which appears in the generator either...
762
762
// - is uninhabited, in which case it can't actually be captured at runtime
763
763
// - appears in the approximation from the static type (`allowed`)
You can’t perform that action at this time.
0 commit comments