Skip to content

Commit 1f7c010

Browse files
committed
gamer
1 parent 8d92a6d commit 1f7c010

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use crate::type_check::{Locations, MirTypeckRegionConstraints};
3636
use crate::universal_regions::{RegionClassification, UniversalRegions};
3737
use crate::{BorrowCheckRootCtxt, BorrowckInferCtxt, BorrowckState};
3838

39-
#[allow(unused)] // TODO
4039
pub(crate) enum DeferredOpaqueTypeError<'tcx> {
4140
UnexpectedHiddenRegion {
4241
/// The opaque type.
@@ -593,7 +592,7 @@ fn apply_defining_uses<'tcx>(
593592
});
594593

595594
let locations = Locations::All(hidden_type.span);
596-
fully_perform_op_raw(
595+
if let Err(guar) = fully_perform_op_raw(
597596
infcx,
598597
body,
599598
universal_regions,
@@ -614,8 +613,9 @@ fn apply_defining_uses<'tcx>(
614613
},
615614
"equating opaque types",
616615
),
617-
)
618-
.expect("failed to relate opaque types");
616+
) {
617+
root_cx.add_concrete_opaque_type(key.def_id, OpaqueHiddenType::new_error(tcx, guar));
618+
}
619619
}
620620
}
621621

0 commit comments

Comments
 (0)