about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2022-06-01 14:43:16 -0300
committerGitHub <noreply@github.com>2022-06-01 14:43:16 -0300
commitb3bc438f56693bd04b05eba44cd7a2e679f5ab0e (patch)
tree50516e41669c86141e6bd999274a35f30a3e3dea /compiler/rustc_ast_lowering/src
parent15f2b119b1e5266ebcaf058f5b4e8a5cd6332452 (diff)
downloadrust-b3bc438f56693bd04b05eba44cd7a2e679f5ab0e.tar.gz
rust-b3bc438f56693bd04b05eba44cd7a2e679f5ab0e.zip
Add debug_assert comment
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 1bd2988576a..b3aa605283f 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -479,6 +479,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
 
         let item = f(self);
         debug_assert_eq!(def_id, item.def_id());
+        // `f` should have consumed all the elements in these vectors when constructing `item`.
         debug_assert!(self.impl_trait_defs.is_empty());
         debug_assert!(self.impl_trait_bounds.is_empty());
         let info = self.make_owner_info(item);