Skip to content

Commit

Permalink
Use proper debugging statements for infinite recursion assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 26, 2018
1 parent 309fd8a commit a693c92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc/traits/query/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for QueryNormalizer<'cx, 'gcx, 'tcx
let concrete_ty = generic_ty.subst(self.tcx(), substs);
self.anon_depth += 1;
if concrete_ty == ty {
println!("generic_ty: {:#?}", generic_ty);
println!("substs {:#?}", substs);
bug!("infinite recursion generic_ty: {:#?}, substs: {:#?}, \
concrete_ty: {:#?}, ty: {:#?}", generic_ty, substs, concrete_ty,
ty);
}
assert_ne!(concrete_ty, ty, "infinite recursion");
let folded_ty = self.fold_ty(concrete_ty);
self.anon_depth -= 1;
folded_ty
Expand Down

0 comments on commit a693c92

Please sign in to comment.