Skip to content

Commit a693c92

Browse files
committed
Use proper debugging statements for infinite recursion assertion
1 parent 309fd8a commit a693c92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/traits/query/normalize.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for QueryNormalizer<'cx, 'gcx, 'tcx
124124
let concrete_ty = generic_ty.subst(self.tcx(), substs);
125125
self.anon_depth += 1;
126126
if concrete_ty == ty {
127-
println!("generic_ty: {:#?}", generic_ty);
128-
println!("substs {:#?}", substs);
127+
bug!("infinite recursion generic_ty: {:#?}, substs: {:#?}, \
128+
concrete_ty: {:#?}, ty: {:#?}", generic_ty, substs, concrete_ty,
129+
ty);
129130
}
130-
assert_ne!(concrete_ty, ty, "infinite recursion");
131131
let folded_ty = self.fold_ty(concrete_ty);
132132
self.anon_depth -= 1;
133133
folded_ty

0 commit comments

Comments
 (0)