Use return_result_from_ensure_ok a bit more
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user