1
Fork 0

Auto merge of #105133 - oli-obk:promoted_def_ids, r=cjgillot

Ensure query backtraces work for `DefId`s created after ast lowering

r? `@cjgillot`
This commit is contained in:
bors 2022-12-03 08:17:46 +00:00
commit 703d95e183
7 changed files with 31 additions and 12 deletions

View file

@ -365,7 +365,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let node_id = self.next_node_id();
// Add a definition for the in-band const def.
self.create_def(parent_def_id.def_id, node_id, DefPathData::AnonConst);
self.create_def(parent_def_id.def_id, node_id, DefPathData::AnonConst, f.span);
let anon_const = AnonConst { id: node_id, value: arg };
generic_args.push(AngleBracketedArg::Arg(GenericArg::Const(anon_const)));