@@ -266,7 +266,6 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
266
266
DefKind :: Trait | DefKind :: TraitAlias ,
267
267
"`DefId` must belong to a trait or trait alias"
268
268
) ;
269
- #[ cfg( debug_assertions) ]
270
269
assert_generic_args_match ( tcx, trait_id, trait_ref. args ) ;
271
270
272
271
let obligation = Obligation {
@@ -1132,7 +1131,6 @@ pub fn make_projection<'tcx>(
1132
1131
debug_assert ! ( false , "type `{assoc_ty}` not found in `{container_id:?}`" ) ;
1133
1132
return None ;
1134
1133
} ;
1135
- #[ cfg( debug_assertions) ]
1136
1134
assert_generic_args_match ( tcx, assoc_item. def_id , args) ;
1137
1135
1138
1136
Some ( ty:: AliasTy :: new ( tcx, assoc_item. def_id , args) )
@@ -1159,7 +1157,6 @@ pub fn make_normalized_projection<'tcx>(
1159
1157
args : impl IntoIterator < Item = impl Into < GenericArg < ' tcx > > > ,
1160
1158
) -> Option < Ty < ' tcx > > {
1161
1159
fn helper < ' tcx > ( tcx : TyCtxt < ' tcx > , param_env : ParamEnv < ' tcx > , ty : AliasTy < ' tcx > ) -> Option < Ty < ' tcx > > {
1162
- #[ cfg( debug_assertions) ]
1163
1160
if let Some ( ( i, arg) ) = ty. args . iter ( ) . enumerate ( ) . find ( |( _, arg) | arg. has_late_bound_regions ( ) ) {
1164
1161
debug_assert ! (
1165
1162
false ,
@@ -1232,7 +1229,6 @@ pub fn make_normalized_projection_with_regions<'tcx>(
1232
1229
args : impl IntoIterator < Item = impl Into < GenericArg < ' tcx > > > ,
1233
1230
) -> Option < Ty < ' tcx > > {
1234
1231
fn helper < ' tcx > ( tcx : TyCtxt < ' tcx > , param_env : ParamEnv < ' tcx > , ty : AliasTy < ' tcx > ) -> Option < Ty < ' tcx > > {
1235
- #[ cfg( debug_assertions) ]
1236
1232
if let Some ( ( i, arg) ) = ty. args . iter ( ) . enumerate ( ) . find ( |( _, arg) | arg. has_late_bound_regions ( ) ) {
1237
1233
debug_assert ! (
1238
1234
false ,
0 commit comments