about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-10 03:26:29 +0000
committerbors <bors@rust-lang.org>2023-01-10 03:26:29 +0000
commitdeba5ddd0776108c51a69844d0ffe3f96886dd52 (patch)
treefd0f493b3efc585f9779903c7451d10a016a958b /compiler/rustc_hir_analysis/src
parentd53924d8c7046aee91c7f83bf4c9c788c2406a7d (diff)
parented840a6c3b953c54e221951910bb33b351bec145 (diff)
downloadrust-deba5ddd0776108c51a69844d0ffe3f96886dd52.tar.gz
rust-deba5ddd0776108c51a69844d0ffe3f96886dd52.zip
Auto merge of #106656 - JohnTitor:rollup-rk2qltg, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #105034 (Add example for iterator_flatten)
 - #105708 (Enable atomic cas for bpf targets)
 - #106175 (Fix bad import suggestion with nested `use` tree)
 - #106204 (No need to take opaques in `check_type_bounds`)
 - #106387 (Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`")
 - #106636 (Accept old spelling of Fuchsia target triples)
 - #106639 (update Miri)
 - #106640 (update test for inductive canonical cycles)
 - #106647 (rustdoc: merge common CSS for `a`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs2
-rw-r--r--compiler/rustc_hir_analysis/src/check/compare_impl_item.rs18
2 files changed, 2 insertions, 18 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index ef563360c4c..43795cfba3f 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -475,7 +475,7 @@ fn check_opaque_meets_bounds<'tcx>(
         }
     }
     // Clean up after ourselves
-    let _ = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types();
+    let _ = infcx.take_opaque_types();
 }
 
 fn is_enum_of_nonnullable_ptr<'tcx>(
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 b260b929beb..7af89934d14 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.
             }
             _ => {
@@ -1972,22 +1972,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(())
 }