Reading the code with @lcnr and @compiler-errors we found that... * the "occurs check" in the inference code is overly simplistic when it comes to aliases * see also rust-lang/trait-system-refactor-initiative#8 General sketch of the algorithm we want * walk down the non-variable type T and look for aliases * if the alias references a variable bound in T, then return "ambiguous, can't make progress" * otherwise, replace it with an inference variable (and a new resulting goal)