Skip to content

Commit b3bc438

Browse files
spastorinocjgillot
andauthored
Add debug_assert comment
Co-authored-by: Camille Gillot <[email protected]>
1 parent 15f2b11 commit b3bc438

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
479479

480480
let item = f(self);
481481
debug_assert_eq!(def_id, item.def_id());
482+
// `f` should have consumed all the elements in these vectors when constructing `item`.
482483
debug_assert!(self.impl_trait_defs.is_empty());
483484
debug_assert!(self.impl_trait_bounds.is_empty());
484485
let info = self.make_owner_info(item);

0 commit comments

Comments
 (0)