]> git.lizzy.rs Git - rust.git/commitdiff
Add debug_assert comment
authorSantiago Pastorino <spastorino@gmail.com>
Wed, 1 Jun 2022 17:43:16 +0000 (14:43 -0300)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 17:43:16 +0000 (14:43 -0300)
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
compiler/rustc_ast_lowering/src/lib.rs

index 1bd2988576a03f8c98f058d4113ea8b6b3a9d95b..b3aa605283fb3c9310608dc6ec75dfa61d8bc638 100644 (file)
@@ -479,6 +479,7 @@ fn with_hir_id_owner(
 
         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);