diff options
| author | Michael Goulet <michael@errs.io> | 2022-12-24 21:30:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-01-09 17:27:42 +0000 |
| commit | 5132e13f137ee343a7a64649fa3795560f69216b (patch) | |
| tree | 90498aa8e71994c42eaf61faf98afbc0ff195ada | |
| parent | 89e0576bd3aec2f1acf935b353900bd75742860b (diff) | |
| download | rust-5132e13f137ee343a7a64649fa3795560f69216b.tar.gz rust-5132e13f137ee343a7a64649fa3795560f69216b.zip | |
No need to take opaques in check_type_bounds
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_impl_item.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 0d3391bbc1e..17f9106e7e0 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -424,7 +424,7 @@ fn compare_asyncness<'tcx>( ty::Alias(ty::Opaque, ..) => { // allow both `async fn foo()` and `fn foo() -> impl Future` } - ty::Error(rustc_errors::ErrorGuaranteed { .. }) => { + ty::Error(_) => { // We don't know if it's ok, but at least it's already an error. } _ => { @@ -1971,22 +1971,6 @@ pub(super) fn check_type_bounds<'tcx>( &outlives_environment, )?; - let constraints = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types(); - for (key, value) in constraints { - infcx - .err_ctxt() - .report_mismatched_types( - &ObligationCause::misc( - value.hidden_type.span, - tcx.hir().local_def_id_to_hir_id(impl_ty.def_id.expect_local()), - ), - tcx.mk_opaque(key.def_id.to_def_id(), key.substs), - value.hidden_type.ty, - TypeError::Mismatch, - ) - .emit(); - } - Ok(()) } |
