@@ -63,7 +63,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
63
63
64
64
for ( def_id, info) in lctx. children {
65
65
let owner = self . owners . ensure_contains_elem ( def_id, || hir:: MaybeOwner :: Phantom ) ;
66
- debug_assert ! (
66
+ assert ! (
67
67
matches!( owner, hir:: MaybeOwner :: Phantom ) ,
68
68
"duplicate copy of {def_id:?} in lctx.children"
69
69
) ;
@@ -78,7 +78,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
78
78
match node {
79
79
AstOwner :: NonOwner => { }
80
80
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 ) ;
82
82
self . with_lctx ( CRATE_NODE_ID , |lctx| {
83
83
let module = lctx. lower_mod ( & c. items , & c. spans ) ;
84
84
// FIXME(jdonszelman): is dummy span ever a problem here?
@@ -1160,7 +1160,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1160
1160
) -> hir:: BodyId {
1161
1161
let body = hir:: Body { params, value : self . arena . alloc ( value) } ;
1162
1162
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) ;
1164
1164
self . bodies . push ( ( id. hir_id . local_id , self . arena . alloc ( body) ) ) ;
1165
1165
id
1166
1166
}
@@ -1673,8 +1673,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
1673
1673
itctx : ImplTraitContext ,
1674
1674
f : impl FnOnce ( & mut Self ) -> T ,
1675
1675
) -> ( & ' 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( ) ) ;
1678
1678
1679
1679
// Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
1680
1680
// Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
0 commit comments