Skip to content

Commit bf1c7da

Browse files
committed
Improve record_def_id_remap docs
1 parent ece5245 commit bf1c7da

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+4
-1
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ impl ResolverAstLoweringExt for ResolverAstLowering {
210210
self.builtin_macro_kinds.get(&def_id).copied().unwrap_or(MacroKind::Bang)
211211
}
212212

213-
/// Push a remapping into the top-most map. Panics if no map has been pushed.
213+
/// Push a remapping into the top-most map.
214+
/// Panics if no map has been pushed.
215+
/// Remapping is used when creating lowering `-> impl Trait` return
216+
/// types to create the resulting opaque type.
214217
#[tracing::instrument(level = "debug", skip(self))]
215218
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId) {
216219
self.generics_def_id_map.last_mut().expect("no map pushed").insert(from, to);

0 commit comments

Comments
 (0)