I think this for loop could be simplified by using `ty::each_bound_trait_and_supertraits`. I'm sorry, I don't have much time to come up with a working example but I'd recommend you to take a look there, it iterates over the bounds and supertraits.