Use return_result_from_ensure_ok a bit more

This commit is contained in:
Michael Goulet
2025-04-02 03:36:04 +00:00
parent a3e6b69471
commit 444a7eb5aa
5 changed files with 8 additions and 7 deletions

View File

@@ -528,7 +528,7 @@ fn mir_drops_elaborated_and_const_checked(tcx: TyCtxt<'_>, def: LocalDefId) -> &
| DefKind::Static { .. }
| DefKind::Const
| DefKind::AssocConst => {
if let Err(guar) = tcx.check_well_formed(root.expect_local()) {
if let Err(guar) = tcx.ensure_ok().check_well_formed(root.expect_local()) {
body.tainted_by_errors = Some(guar);
}
}