Skip to content

Commit 8672720

Browse files
Remove debug assertions
1 parent 789bc73 commit 8672720

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clippy_utils/src/ty.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
266266
DefKind::Trait | DefKind::TraitAlias,
267267
"`DefId` must belong to a trait or trait alias"
268268
);
269-
#[cfg(debug_assertions)]
270269
assert_generic_args_match(tcx, trait_id, trait_ref.args);
271270

272271
let obligation = Obligation {
@@ -1132,7 +1131,6 @@ pub fn make_projection<'tcx>(
11321131
debug_assert!(false, "type `{assoc_ty}` not found in `{container_id:?}`");
11331132
return None;
11341133
};
1135-
#[cfg(debug_assertions)]
11361134
assert_generic_args_match(tcx, assoc_item.def_id, args);
11371135

11381136
Some(ty::AliasTy::new(tcx, assoc_item.def_id, args))
@@ -1159,7 +1157,6 @@ pub fn make_normalized_projection<'tcx>(
11591157
args: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
11601158
) -> Option<Ty<'tcx>> {
11611159
fn helper<'tcx>(tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, ty: AliasTy<'tcx>) -> Option<Ty<'tcx>> {
1162-
#[cfg(debug_assertions)]
11631160
if let Some((i, arg)) = ty.args.iter().enumerate().find(|(_, arg)| arg.has_late_bound_regions()) {
11641161
debug_assert!(
11651162
false,
@@ -1232,7 +1229,6 @@ pub fn make_normalized_projection_with_regions<'tcx>(
12321229
args: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
12331230
) -> Option<Ty<'tcx>> {
12341231
fn helper<'tcx>(tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, ty: AliasTy<'tcx>) -> Option<Ty<'tcx>> {
1235-
#[cfg(debug_assertions)]
12361232
if let Some((i, arg)) = ty.args.iter().enumerate().find(|(_, arg)| arg.has_late_bound_regions()) {
12371233
debug_assert!(
12381234
false,

0 commit comments

Comments
 (0)