about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2022-08-04 12:47:19 -0300
committerSantiago Pastorino <spastorino@gmail.com>2022-08-04 12:47:19 -0300
commitbf1c7da1476c8193a0e92262c3e4dd2d88392569 (patch)
tree8a83a3b4247ec5dfc9eb5fe96e8a8af30947e31a
parentece52451f6278bd4b3bdf02d82153ffb5c1b7f1d (diff)
downloadrust-bf1c7da1476c8193a0e92262c3e4dd2d88392569.tar.gz
rust-bf1c7da1476c8193a0e92262c3e4dd2d88392569.zip
Improve record_def_id_remap docs
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 49f5470d181..84388d3d653 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -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);