Skip to content

Commit 5132e13

Browse files
No need to take opaques in check_type_bounds
1 parent 89e0576 commit 5132e13

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

+1-17
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ fn compare_asyncness<'tcx>(
424424
ty::Alias(ty::Opaque, ..) => {
425425
// allow both `async fn foo()` and `fn foo() -> impl Future`
426426
}
427-
ty::Error(rustc_errors::ErrorGuaranteed { .. }) => {
427+
ty::Error(_) => {
428428
// We don't know if it's ok, but at least it's already an error.
429429
}
430430
_ => {
@@ -1971,22 +1971,6 @@ pub(super) fn check_type_bounds<'tcx>(
19711971
&outlives_environment,
19721972
)?;
19731973

1974-
let constraints = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types();
1975-
for (key, value) in constraints {
1976-
infcx
1977-
.err_ctxt()
1978-
.report_mismatched_types(
1979-
&ObligationCause::misc(
1980-
value.hidden_type.span,
1981-
tcx.hir().local_def_id_to_hir_id(impl_ty.def_id.expect_local()),
1982-
),
1983-
tcx.mk_opaque(key.def_id.to_def_id(), key.substs),
1984-
value.hidden_type.ty,
1985-
TypeError::Mismatch,
1986-
)
1987-
.emit();
1988-
}
1989-
19901974
Ok(())
19911975
}
19921976

0 commit comments

Comments
 (0)