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-03-06 00:43:06 +0000
committerbors <bors@rust-lang.org>2023-03-06 00:43:06 +0000
commit8c0f83d773370150a6ea1b40b36b55566e40a73c (patch)
treef5b92cab22d822c840c432787542104a53684ace /compiler/rustc_hir_analysis/src
parent816f958ac3db8931855c42649809aead01d20d9b (diff)
parentc08c69b4b11aa45da931fd025ff2648aebd24d46 (diff)
downloadrust-8c0f83d773370150a6ea1b40b36b55566e40a73c.tar.gz
rust-8c0f83d773370150a6ea1b40b36b55566e40a73c.zip
Auto merge of #108789 - matthiaskrgr:rollup-nyurto8, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #108244 (Add test for semicolon recovery ICE)
 - #108746 (Don't project to RPITIT that has no default value)
 - #108764 (Tweaks to -Zdrop-tracking-mir)
 - #108770 (Improve documentation and argument naming of some TyCtxt methods)
 - #108773 (x fmt: Only check modified files locally)
 - #108775 (Use the correct bound vars in return type suggestion.)
 - #108776 (Make `x test tidy` less noisy)

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.rs8
-rw-r--r--compiler/rustc_hir_analysis/src/collect/type_of.rs4
2 files changed, 10 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index 9693a59defb..3449d3d439d 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -1510,6 +1510,14 @@ fn opaque_type_cycle_error(
                     {
                         label_match(interior_ty.ty, interior_ty.span);
                     }
+                    if tcx.sess.opts.unstable_opts.drop_tracking_mir
+                        && let DefKind::Generator = tcx.def_kind(closure_def_id)
+                    {
+                        let generator_layout = tcx.mir_generator_witnesses(closure_def_id);
+                        for interior_ty in &generator_layout.field_tys {
+                            label_match(interior_ty.ty, interior_ty.source_info.span);
+                        }
+                    }
                 }
             }
         }
diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs
index acd9f8a5c8e..7fc0711a155 100644
--- a/compiler/rustc_hir_analysis/src/collect/type_of.rs
+++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs
@@ -344,8 +344,8 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::EarlyBinder<Ty<'_>>
                     in_trait,
                     ..
                 }) => {
-                    if in_trait {
-                        assert!(tcx.impl_defaultness(owner).has_value());
+                    if in_trait && !tcx.impl_defaultness(owner).has_value() {
+                        span_bug!(tcx.def_span(def_id), "tried to get type of this RPITIT with no definition");
                     }
                     find_opaque_ty_constraints_for_rpit(tcx, def_id, owner)
                 }