@@ -63,7 +63,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
6363
6464 for ( def_id, info) in lctx. children {
6565 let owner = self . owners . ensure_contains_elem ( def_id, || hir:: MaybeOwner :: Phantom ) ;
66- debug_assert ! (
66+ assert ! (
6767 matches!( owner, hir:: MaybeOwner :: Phantom ) ,
6868 "duplicate copy of {def_id:?} in lctx.children"
6969 ) ;
@@ -78,7 +78,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
7878 match node {
7979 AstOwner :: NonOwner => { }
8080 AstOwner :: Crate ( c) => {
81- debug_assert_eq ! ( self . resolver. node_id_to_def_id[ & CRATE_NODE_ID ] , CRATE_DEF_ID ) ;
81+ assert_eq ! ( self . resolver. node_id_to_def_id[ & CRATE_NODE_ID ] , CRATE_DEF_ID ) ;
8282 self . with_lctx ( CRATE_NODE_ID , |lctx| {
8383 let module = lctx. lower_mod ( & c. items , & c. spans ) ;
8484 // FIXME(jdonszelman): is dummy span ever a problem here?
@@ -1160,7 +1160,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
11601160 ) -> hir:: BodyId {
11611161 let body = hir:: Body { params, value : self . arena . alloc ( value) } ;
11621162 let id = body. id ( ) ;
1163- debug_assert_eq ! ( id. hir_id. owner, self . current_hir_id_owner) ;
1163+ assert_eq ! ( id. hir_id. owner, self . current_hir_id_owner) ;
11641164 self . bodies . push ( ( id. hir_id . local_id , self . arena . alloc ( body) ) ) ;
11651165 id
11661166 }
@@ -1673,8 +1673,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
16731673 itctx : ImplTraitContext ,
16741674 f : impl FnOnce ( & mut Self ) -> T ,
16751675 ) -> ( & ' hir hir:: Generics < ' hir > , T ) {
1676- debug_assert ! ( self . impl_trait_defs. is_empty( ) ) ;
1677- debug_assert ! ( self . impl_trait_bounds. is_empty( ) ) ;
1676+ assert ! ( self . impl_trait_defs. is_empty( ) ) ;
1677+ assert ! ( self . impl_trait_bounds. is_empty( ) ) ;
16781678
16791679 // Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
16801680 // Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
0 commit comments