diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-01 08:53:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 08:53:07 +0200 |
| commit | b067ee82f83b339609808d25e704fa457645445e (patch) | |
| tree | 5a05df0adc87667cee02be8c59f320cdb5da8a9a /compiler/rustc_hir_analysis/src/lib.rs | |
| parent | c7e64dcbf155b237a1662a6377e6157bfc5bf316 (diff) | |
| parent | 552794410a9237a26aded88990dbe8be26c72dfc (diff) | |
| download | rust-b067ee82f83b339609808d25e704fa457645445e.tar.gz rust-b067ee82f83b339609808d25e704fa457645445e.zip | |
Rollup merge of #127181 - BoxyUwU:dump_def_parents, r=compiler-errors
Introduce a `rustc_` attribute to dump all the `DefId` parents of a `DefId` We've run into a bunch of issues with anon consts having the wrong generics and it would have been incredibly helpful to be able to quickly slap a `rustc_` attribute to check what `tcx.parent(` will return on the relevant DefIds. I wasn't sure of a better way to make this work for anon consts than requiring the attribute to be on the enclosing item and then walking the inside of it to look for any anon consts. This particular method will honestly break at some point when we stop having a `DefId` available for anon consts in hir but that's for another day... r? ``@compiler-errors``
Diffstat (limited to 'compiler/rustc_hir_analysis/src/lib.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index cf41f51f748..44f1830a3b1 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -175,6 +175,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) { tcx.sess.time("variance_dumping", || variance::dump::variances(tcx)); collect::dump::opaque_hidden_types(tcx); collect::dump::predicates_and_item_bounds(tcx); + collect::dump::def_parents(tcx); } // Make sure we evaluate all static and (non-associated) const items, even if unused. |
