1
Fork 0

Improve record_def_id_remap docs

This commit is contained in:
Santiago Pastorino 2022-08-04 12:47:19 -03:00
parent ece52451f6
commit bf1c7da147
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF

View file

@ -210,7 +210,10 @@ impl ResolverAstLoweringExt for ResolverAstLowering {
self.builtin_macro_kinds.get(&def_id).copied().unwrap_or(MacroKind::Bang)
}
/// Push a remapping into the top-most map. Panics if no map has been pushed.
/// Push a remapping into the top-most map.
/// Panics if no map has been pushed.
/// Remapping is used when creating lowering `-> impl Trait` return
/// types to create the resulting opaque type.
#[tracing::instrument(level = "debug", skip(self))]
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId) {
self.generics_def_id_map.last_mut().expect("no map pushed").insert(from, to);