mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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.
|
||||
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(),
|
||||
|
Loading…
Reference in New Issue
Block a user