fix #115348
This commit is contained in:
parent
51a9df8c70
commit
df6e6a6d08
@ -483,7 +483,7 @@ fn unsafety_check_result(tcx: TyCtxt<'_>, def: LocalDefId) -> &UnsafetyCheckResu
|
|||||||
// `mir_built` force this.
|
// `mir_built` force this.
|
||||||
let body = &tcx.mir_built(def).borrow();
|
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 {
|
return tcx.arena.alloc(UnsafetyCheckResult {
|
||||||
violations: Vec::new(),
|
violations: Vec::new(),
|
||||||
used_unsafe_blocks: Default::default(),
|
used_unsafe_blocks: Default::default(),
|
||||||
|
Loading…
Reference in New Issue
Block a user