diff options
| author | bors <bors@rust-lang.org> | 2022-10-12 06:57:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-12 06:57:24 +0000 |
| commit | e6ce5627a9e8af9ae4673a390954fffaf526e5cc (patch) | |
| tree | a7787f3dd60a56b679bd953185cf48229c971d41 /compiler/rustc_hir_analysis/src | |
| parent | 2b91cbe2d4ce90d30520674876e9d700cf7a561b (diff) | |
| parent | 96bcced390ee149436bab890b70821ff34912b53 (diff) | |
| download | rust-e6ce5627a9e8af9ae4673a390954fffaf526e5cc.tar.gz rust-e6ce5627a9e8af9ae4673a390954fffaf526e5cc.zip | |
Auto merge of #102948 - Dylan-DPC:rollup-j8h74rb, r=Dylan-DPC
Rollup of 8 pull requests
Successful merges:
- #102110 (Migrate rustc_passes diagnostics)
- #102187 (Use correct location for type tests in promoted constants)
- #102239 (Move style guide to rust-lang/rust)
- #102578 (Panic for invalid arguments of `{integer primitive}::ilog{,2,10}` in all modes)
- #102811 (Use memset to initialize readbuf)
- #102890 (Check representability in adt_sized_constraint)
- #102913 (unify `IsPattern` and `IsImport` enum in `show_candidates`)
- #102924 (rustdoc: remove unused classes from sidebar links)
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.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 77ab27266b2..f6f25603581 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -380,7 +380,6 @@ fn check_struct(tcx: TyCtxt<'_>, def_id: LocalDefId) { let def = tcx.adt_def(def_id); let span = tcx.def_span(def_id); def.destructor(tcx); // force the destructor to be evaluated - let _ = tcx.representability(def_id); if def.repr().simd() { check_simd(tcx, span, def_id); @@ -394,7 +393,6 @@ fn check_union(tcx: TyCtxt<'_>, def_id: LocalDefId) { let def = tcx.adt_def(def_id); let span = tcx.def_span(def_id); def.destructor(tcx); // force the destructor to be evaluated - let _ = tcx.representability(def_id); check_transparent(tcx, span, def); check_union_fields(tcx, span, def_id); check_packed(tcx, span, def); @@ -1489,7 +1487,6 @@ fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, vs: &'tcx [hir::Variant<'tcx>], def_id: L detect_discriminant_duplicate(tcx, def.discriminants(tcx).collect(), vs, sp); - let _ = tcx.representability(def_id); check_transparent(tcx, sp, def); } diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 0bd45bb1c91..0a8a1bec9b8 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1041,6 +1041,8 @@ fn check_type_defn<'tcx, F>( ) where F: FnMut(&WfCheckingCtxt<'_, 'tcx>) -> Vec<AdtVariant<'tcx>>, { + let _ = tcx.representability(item.def_id.def_id); + enter_wf_checking_ctxt(tcx, item.span, item.def_id.def_id, |wfcx| { let variants = lookup_fields(wfcx); let packed = tcx.adt_def(item.def_id).repr().packed(); |
