Skip to content

Commit

Permalink
fix #115348
Browse files Browse the repository at this point in the history
  • Loading branch information
kiscad committed Sep 6, 2023
1 parent 51a9df8 commit df6e6a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/check_unsafety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ fn unsafety_check_result(tcx: TyCtxt<'_>, def: LocalDefId) -> &UnsafetyCheckResu
// `mir_built` force this.
let body = &tcx.mir_built(def).borrow();

if body.is_custom_mir() {
if body.is_custom_mir() || body.tainted_by_errors.is_some() {
return tcx.arena.alloc(UnsafetyCheckResult {
violations: Vec::new(),
used_unsafe_blocks: Default::default(),
Expand Down

0 comments on commit df6e6a6

Please sign in to comment.