Skip to content

Commit 814bfe9

Browse files
committed
This check should now be unreachable
1 parent a5d3723 commit 814bfe9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_hir_typeck/src/expr_use_visitor.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
734734
// struct; however, when EUV is run during typeck, it
735735
// may not. This will generate an error earlier in typeck,
736736
// so we can just ignore it.
737-
if self.cx.tcx().dcx().has_errors().is_none() {
738-
span_bug!(with_expr.span, "with expression doesn't evaluate to a struct");
739-
}
737+
span_bug!(with_expr.span, "with expression doesn't evaluate to a struct");
740738
}
741739
}
742740

0 commit comments

Comments
 (0)