Skip to content

Commit 6148db7

Browse files
committed
Modify as_local_hir_id to accept a LocalDefId instead of a DefId
1 parent 92fb59d commit 6148db7

File tree

86 files changed

+579
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+579
-444
lines changed

src/librustc_codegen_llvm/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn get_fn(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> &'ll Value
116116
if cx.tcx.sess.opts.share_generics() {
117117
// We are in share_generics mode.
118118

119-
if instance_def_id.is_local() {
119+
if let Some(instance_def_id) = instance_def_id.as_local() {
120120
// This is a definition from the current crate. If the
121121
// definition is unreachable for downstream crates or
122122
// the current crate does not re-export generics, the

src/librustc_codegen_llvm/consts.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ impl CodegenCx<'ll, 'tcx> {
209209

210210
debug!("get_static: sym={} instance={:?}", sym, instance);
211211

212-
let g = if let Some(id) = self.tcx.hir().as_local_hir_id(def_id) {
212+
let g = if let Some(id) =
213+
def_id.as_local().map(|def_id| self.tcx.hir().as_local_hir_id(def_id).unwrap())
214+
{
213215
let llty = self.layout_of(ty).llvm_type(self);
214216
let (g, attrs) = match self.tcx.hir().get(id) {
215217
Node::Item(&hir::Item { attrs, span, kind: hir::ItemKind::Static(..), .. }) => {

src/librustc_codegen_ssa/back/symbol_export.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ fn upstream_drop_glue_for_provider<'tcx>(
361361
}
362362

363363
fn is_unreachable_local_definition_provider(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
364-
if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
365-
!tcx.reachable_set(LOCAL_CRATE).contains(&hir_id)
364+
if let Some(def_id) = def_id.as_local() {
365+
!tcx.reachable_set(LOCAL_CRATE).contains(&tcx.hir().as_local_hir_id(def_id).unwrap())
366366
} else {
367367
bug!("is_unreachable_local_definition called with non-local DefId: {:?}", def_id)
368368
}

src/librustc_hir/definitions.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,8 @@ impl Definitions {
342342
}
343343

344344
#[inline]
345-
pub fn as_local_hir_id(&self, def_id: DefId) -> Option<hir::HirId> {
346-
if let Some(def_id) = def_id.as_local() {
347-
Some(self.local_def_id_to_hir_id(def_id))
348-
} else {
349-
None
350-
}
345+
pub fn as_local_hir_id(&self, def_id: LocalDefId) -> Option<hir::HirId> {
346+
Some(self.local_def_id_to_hir_id(def_id))
351347
}
352348

353349
#[inline]

src/librustc_infer/infer/error_reporting/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn msg_span_from_early_bound_and_free_regions(
191191
let sm = tcx.sess.source_map();
192192

193193
let scope = region.free_region_binding_scope(tcx);
194-
let node = tcx.hir().as_local_hir_id(scope).unwrap();
194+
let node = tcx.hir().as_local_hir_id(scope.expect_local()).unwrap();
195195
let tag = match tcx.hir().find(node) {
196196
Some(Node::Block(_) | Node::Expr(_)) => "body",
197197
Some(Node::Item(it)) => item_scope_tag(&it),
@@ -1782,10 +1782,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
17821782
if !(generics.has_self && param.index == 0) {
17831783
let type_param = generics.type_param(param, self.tcx);
17841784
let hir = &self.tcx.hir();
1785-
hir.as_local_hir_id(type_param.def_id).map(|id| {
1785+
type_param.def_id.as_local().map(|def_id| {
17861786
// Get the `hir::Param` to verify whether it already has any bounds.
17871787
// We do this to avoid suggesting code that ends up as `T: 'a'b`,
17881788
// instead we suggest `T: 'a + 'b` in that case.
1789+
let id = hir.as_local_hir_id(def_id).unwrap();
17891790
let mut has_bounds = false;
17901791
if let Node::GenericParam(param) = hir.get(id) {
17911792
has_bounds = !param.bounds.is_empty();

src/librustc_infer/infer/error_reporting/nice_region_error/find_anon_type.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
2929
) -> Option<(&hir::Ty<'_>, &hir::FnDecl<'_>)> {
3030
if let Some(anon_reg) = self.tcx().is_suitable_region(region) {
3131
let def_id = anon_reg.def_id;
32-
if let Some(hir_id) = self.tcx().hir().as_local_hir_id(def_id) {
32+
if let Some(hir_id) =
33+
def_id.as_local().map(|def_id| self.tcx().hir().as_local_hir_id(def_id).unwrap())
34+
{
3335
let fndecl = match self.tcx().hir().get(hir_id) {
3436
Node::Item(&hir::Item { kind: hir::ItemKind::Fn(ref m, ..), .. })
3537
| Node::TraitItem(&hir::TraitItem {

src/librustc_infer/infer/error_reporting/nice_region_error/outlives_closure.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
4646
) = (&sub_origin, sup_region)
4747
{
4848
let hir = &self.tcx().hir();
49-
if let Some(hir_id) = hir.as_local_hir_id(free_region.scope) {
49+
if let Some(hir_id) =
50+
free_region.scope.as_local().map(|def_id| hir.as_local_hir_id(def_id).unwrap())
51+
{
5052
if let Node::Expr(Expr { kind: Closure(_, _, _, closure_span, None), .. }) =
5153
hir.get(hir_id)
5254
{

src/librustc_infer/infer/error_reporting/nice_region_error/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
5151
};
5252

5353
let hir = &self.tcx().hir();
54-
let hir_id = hir.as_local_hir_id(id)?;
54+
let hir_id = hir.as_local_hir_id(id.as_local()?)?;
5555
let body_id = hir.maybe_body_owned_by(hir_id)?;
5656
let body = hir.body(body_id);
5757
let owner_id = hir.body_owner(body_id);

src/librustc_lint/builtin.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
436436
// If the trait is private, add the impl items to `private_traits` so they don't get
437437
// reported for missing docs.
438438
let real_trait = trait_ref.path.res.def_id();
439-
if let Some(hir_id) = cx.tcx.hir().as_local_hir_id(real_trait) {
439+
if let Some(hir_id) = real_trait
440+
.as_local()
441+
.map(|def_id| cx.tcx.hir().as_local_hir_id(def_id).unwrap())
442+
{
440443
if let Some(Node::Item(item)) = cx.tcx.hir().find(hir_id) {
441444
if let hir::VisibilityKind::Inherited = item.vis.node {
442445
for impl_item_ref in items {
@@ -609,7 +612,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDebugImplementations {
609612
let mut impls = HirIdSet::default();
610613
cx.tcx.for_each_impl(debug, |d| {
611614
if let Some(ty_def) = cx.tcx.type_of(d).ty_adt_def() {
612-
if let Some(hir_id) = cx.tcx.hir().as_local_hir_id(ty_def.did) {
615+
if let Some(hir_id) = ty_def
616+
.did
617+
.as_local()
618+
.map(|def_id| cx.tcx.hir().as_local_hir_id(def_id).unwrap())
619+
{
613620
impls.insert(hir_id);
614621
}
615622
}

src/librustc_lint/late.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_ast::ast;
1919
use rustc_ast::walk_list;
2020
use rustc_data_structures::sync::{join, par_iter, ParallelIterator};
2121
use rustc_hir as hir;
22-
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
22+
use rustc_hir::def_id::{LocalDefId, LOCAL_CRATE};
2323
use rustc_hir::intravisit as hir_visit;
2424
use rustc_hir::intravisit::Visitor;
2525
use rustc_middle::hir::map::Map;
@@ -353,7 +353,7 @@ crate::late_lint_methods!(late_lint_pass_impl, [], ['tcx]);
353353

354354
fn late_lint_mod_pass<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(
355355
tcx: TyCtxt<'tcx>,
356-
module_def_id: DefId,
356+
module_def_id: LocalDefId,
357357
pass: T,
358358
) {
359359
let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE);
@@ -382,7 +382,7 @@ fn late_lint_mod_pass<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(
382382

383383
pub fn late_lint_mod<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>(
384384
tcx: TyCtxt<'tcx>,
385-
module_def_id: DefId,
385+
module_def_id: LocalDefId,
386386
builtin_lints: T,
387387
) {
388388
if tcx.sess.opts.debugging_opts.no_interleave_lints {

src/librustc_lint/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ pub fn provide(providers: &mut Providers<'_>) {
9191
}
9292

9393
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: DefId) {
94-
late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
94+
late::late_lint_mod(
95+
tcx,
96+
module_def_id.expect_local(),
97+
BuiltinCombinedModuleLateLintPass::new(),
98+
);
9599
}
96100

97101
macro_rules! pre_expansion_lint_passes {

src/librustc_metadata/rmeta/encoder.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ impl EncodeContext<'tcx> {
617617
ctor: variant.ctor_def_id.map(|did| did.index),
618618
};
619619

620-
let enum_id = tcx.hir().as_local_hir_id(def.did).unwrap();
620+
let enum_id = tcx.hir().as_local_hir_id(def.did.expect_local()).unwrap();
621621
let enum_vis = &tcx.hir().expect_item(enum_id).vis;
622622

623623
record!(self.tables.kind[def_id] <- EntryKind::Variant(self.lazy(data)));
@@ -663,7 +663,7 @@ impl EncodeContext<'tcx> {
663663

664664
// Variant constructors have the same visibility as the parent enums, unless marked as
665665
// non-exhaustive, in which case they are lowered to `pub(crate)`.
666-
let enum_id = tcx.hir().as_local_hir_id(def.did).unwrap();
666+
let enum_id = tcx.hir().as_local_hir_id(def.did.expect_local()).unwrap();
667667
let enum_vis = &tcx.hir().expect_item(enum_id).vis;
668668
let mut ctor_vis = ty::Visibility::from_hir(enum_vis, enum_id, tcx);
669669
if variant.is_field_list_non_exhaustive() && ctor_vis == ty::Visibility::Public {
@@ -729,7 +729,7 @@ impl EncodeContext<'tcx> {
729729
let def_id = field.did;
730730
debug!("EncodeContext::encode_field({:?})", def_id);
731731

732-
let variant_id = tcx.hir().as_local_hir_id(variant.def_id).unwrap();
732+
let variant_id = tcx.hir().as_local_hir_id(variant.def_id.expect_local()).unwrap();
733733
let variant_data = tcx.hir().expect_variant_data(variant_id);
734734

735735
record!(self.tables.kind[def_id] <- EntryKind::Field);
@@ -756,7 +756,7 @@ impl EncodeContext<'tcx> {
756756
ctor: Some(def_id.index),
757757
};
758758

759-
let struct_id = tcx.hir().as_local_hir_id(adt_def.did).unwrap();
759+
let struct_id = tcx.hir().as_local_hir_id(adt_def.did.expect_local()).unwrap();
760760
let struct_vis = &tcx.hir().expect_item(struct_id).vis;
761761
let mut ctor_vis = ty::Visibility::from_hir(struct_vis, struct_id, tcx);
762762
for field in &variant.fields {
@@ -818,7 +818,7 @@ impl EncodeContext<'tcx> {
818818
debug!("EncodeContext::encode_info_for_trait_item({:?})", def_id);
819819
let tcx = self.tcx;
820820

821-
let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap();
821+
let hir_id = tcx.hir().as_local_hir_id(def_id.expect_local()).unwrap();
822822
let ast_item = tcx.hir().expect_trait_item(hir_id);
823823
let trait_item = tcx.associated_item(def_id);
824824

@@ -909,7 +909,7 @@ impl EncodeContext<'tcx> {
909909
debug!("EncodeContext::encode_info_for_impl_item({:?})", def_id);
910910
let tcx = self.tcx;
911911

912-
let hir_id = self.tcx.hir().as_local_hir_id(def_id).unwrap();
912+
let hir_id = self.tcx.hir().as_local_hir_id(def_id.expect_local()).unwrap();
913913
let ast_item = self.tcx.hir().expect_impl_item(hir_id);
914914
let impl_item = self.tcx.associated_item(def_id);
915915

@@ -1309,14 +1309,14 @@ impl EncodeContext<'tcx> {
13091309
}
13101310

13111311
fn encode_info_for_closure(&mut self, def_id: LocalDefId) {
1312-
let def_id = def_id.to_def_id();
13131312
debug!("EncodeContext::encode_info_for_closure({:?})", def_id);
13141313

13151314
// NOTE(eddyb) `tcx.type_of(def_id)` isn't used because it's fully generic,
13161315
// including on the signature, which is inferred in `typeck_tables_of.
13171316
let hir_id = self.tcx.hir().as_local_hir_id(def_id).unwrap();
13181317
let ty = self.tcx.typeck_tables_of(def_id).node_type(hir_id);
13191318

1319+
let def_id = def_id.to_def_id();
13201320
record!(self.tables.kind[def_id] <- match ty.kind {
13211321
ty::Generator(..) => {
13221322
let data = self.tcx.generator_kind(def_id).unwrap();
@@ -1340,11 +1340,11 @@ impl EncodeContext<'tcx> {
13401340
}
13411341

13421342
fn encode_info_for_anon_const(&mut self, def_id: LocalDefId) {
1343-
let def_id = def_id.to_def_id();
13441343
debug!("EncodeContext::encode_info_for_anon_const({:?})", def_id);
13451344
let id = self.tcx.hir().as_local_hir_id(def_id).unwrap();
13461345
let body_id = self.tcx.hir().body_owned_by(id);
13471346
let const_data = self.encode_rendered_const_for_body(body_id);
1347+
let def_id = def_id.to_def_id();
13481348
let qualifs = self.tcx.mir_const_qualif(def_id);
13491349

13501350
record!(self.tables.kind[def_id] <- EntryKind::Const(qualifs, const_data));

src/librustc_middle/dep_graph/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_data_structures::profiling::SelfProfilerRef;
55
use rustc_data_structures::sync::Lock;
66
use rustc_data_structures::thin_vec::ThinVec;
77
use rustc_errors::Diagnostic;
8-
use rustc_hir::def_id::DefId;
8+
use rustc_hir::def_id::LocalDefId;
99

1010
mod dep_node;
1111

@@ -106,7 +106,7 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
106106
match dep_node.kind {
107107
DepKind::hir_owner | DepKind::hir_owner_nodes | DepKind::CrateMetadata => {
108108
if let Some(def_id) = dep_node.extract_def_id(*self) {
109-
if def_id_corresponds_to_hir_dep_node(*self, def_id) {
109+
if def_id_corresponds_to_hir_dep_node(*self, def_id.expect_local()) {
110110
if dep_node.kind == DepKind::CrateMetadata {
111111
// The `DefPath` has corresponding node,
112112
// and that node should have been marked
@@ -180,7 +180,7 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
180180
}
181181
}
182182

183-
fn def_id_corresponds_to_hir_dep_node(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
183+
fn def_id_corresponds_to_hir_dep_node(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
184184
let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap();
185-
def_id.index == hir_id.owner.local_def_index
185+
def_id == hir_id.owner
186186
}

src/librustc_middle/hir/map/mod.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl<'hir> Map<'hir> {
198198
}
199199

200200
#[inline]
201-
pub fn as_local_hir_id(&self, def_id: DefId) -> Option<HirId> {
201+
pub fn as_local_hir_id(&self, def_id: LocalDefId) -> Option<HirId> {
202202
self.tcx.definitions.as_local_hir_id(def_id)
203203
}
204204

@@ -448,7 +448,7 @@ impl<'hir> Map<'hir> {
448448
}
449449
}
450450

451-
pub fn get_module(&self, module: DefId) -> (&'hir Mod<'hir>, Span, HirId) {
451+
pub fn get_module(&self, module: LocalDefId) -> (&'hir Mod<'hir>, Span, HirId) {
452452
let hir_id = self.as_local_hir_id(module).unwrap();
453453
match self.get_entry(hir_id).node {
454454
Node::Item(&Item { span, kind: ItemKind::Mod(ref m), .. }) => (m, span, hir_id),
@@ -482,7 +482,11 @@ impl<'hir> Map<'hir> {
482482
}
483483

484484
pub fn get_if_local(&self, id: DefId) -> Option<Node<'hir>> {
485-
self.as_local_hir_id(id).map(|id| self.get(id))
485+
if let Some(id) = id.as_local() {
486+
self.as_local_hir_id(id).map(|id| self.get(id))
487+
} else {
488+
None
489+
}
486490
}
487491

488492
pub fn get_generics(&self, id: DefId) -> Option<&'hir Generics<'hir>> {
@@ -883,7 +887,11 @@ impl<'hir> Map<'hir> {
883887
}
884888

885889
pub fn span_if_local(&self, id: DefId) -> Option<Span> {
886-
self.as_local_hir_id(id).map(|id| self.span(id))
890+
if let Some(id) = id.as_local() {
891+
self.as_local_hir_id(id).map(|id| self.span(id))
892+
} else {
893+
None
894+
}
887895
}
888896

889897
pub fn res_span(&self, res: Res) -> Option<Span> {
@@ -1083,8 +1091,8 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId) -> String {
10831091

10841092
pub fn provide(providers: &mut Providers<'_>) {
10851093
providers.def_kind = |tcx, def_id| {
1086-
if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
1087-
tcx.hir().def_kind(hir_id)
1094+
if let Some(def_id) = def_id.as_local() {
1095+
tcx.hir().def_kind(tcx.hir().as_local_hir_id(def_id).unwrap())
10881096
} else {
10891097
bug!("calling local def_kind query provider for upstream DefId: {:?}", def_id);
10901098
}

src/librustc_middle/hir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ impl<'tcx> TyCtxt<'tcx> {
6868
pub fn provide(providers: &mut Providers<'_>) {
6969
providers.parent_module_from_def_id = |tcx, id| {
7070
let hir = tcx.hir();
71-
hir.local_def_id(hir.get_module_parent_node(hir.as_local_hir_id(id.to_def_id()).unwrap()))
71+
hir.local_def_id(hir.get_module_parent_node(hir.as_local_hir_id(id).unwrap()))
7272
};
7373
providers.hir_crate = |tcx, _| tcx.untracked_crate;
7474
providers.index_hir = map::index_hir;
7575
providers.hir_module_items = |tcx, id| {
7676
let hir = tcx.hir();
77-
let module = hir.as_local_hir_id(id.to_def_id()).unwrap();
77+
let module = hir.as_local_hir_id(id).unwrap();
7878
&tcx.untracked_crate.modules[&module]
7979
};
8080
providers.hir_owner = |tcx, id| tcx.index_hir(LOCAL_CRATE).map[id].signature;

src/librustc_middle/middle/region.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ impl<'tcx> ScopeTree {
554554
pub fn early_free_scope(&self, tcx: TyCtxt<'tcx>, br: &ty::EarlyBoundRegion) -> Scope {
555555
let param_owner = tcx.parent(br.def_id).unwrap();
556556

557-
let param_owner_id = tcx.hir().as_local_hir_id(param_owner).unwrap();
557+
let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local()).unwrap();
558558
let scope = tcx
559559
.hir()
560560
.maybe_body_owned_by(param_owner_id)
@@ -595,7 +595,7 @@ impl<'tcx> ScopeTree {
595595
// on the same function that they ended up being freed in.
596596
assert_eq!(param_owner, fr.scope);
597597

598-
let param_owner_id = tcx.hir().as_local_hir_id(param_owner).unwrap();
598+
let param_owner_id = tcx.hir().as_local_hir_id(param_owner.expect_local()).unwrap();
599599
let body_id = tcx.hir().body_owned_by(param_owner_id);
600600
Scope { id: tcx.hir().body(body_id).value.hir_id.local_id, data: ScopeData::CallSite }
601601
}

src/librustc_middle/mir/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,10 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23382338
}
23392339

23402340
AggregateKind::Closure(def_id, substs) => ty::tls::with(|tcx| {
2341-
if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
2341+
if let Some(hir_id) = def_id
2342+
.as_local()
2343+
.map(|def_id| tcx.hir().as_local_hir_id(def_id).unwrap())
2344+
{
23422345
let name = if tcx.sess.opts.debugging_opts.span_free_formats {
23432346
let substs = tcx.lift(&substs).unwrap();
23442347
format!(
@@ -2364,7 +2367,10 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23642367
}),
23652368

23662369
AggregateKind::Generator(def_id, _, _) => ty::tls::with(|tcx| {
2367-
if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
2370+
if let Some(hir_id) = def_id
2371+
.as_local()
2372+
.map(|def_id| tcx.hir().as_local_hir_id(def_id).unwrap())
2373+
{
23682374
let name = format!("[generator@{:?}]", tcx.hir().span(hir_id));
23692375
let mut struct_fmt = fmt.debug_struct(&name);
23702376

0 commit comments

Comments
 (0)