I'm refactoring the Chalk lowering code in rust-analyzer a bit (preparing for the chalk-ir changes), and I was wondering what the best way to handle errors in where clauses is (e.g. where T: UnknownTrait). We used to lower them to a clause that can never be met by 'making up' a trait without impls, but that is kind of an ugly hack. We could also just leave them out, i.e. make them always succeed. Or we could add a WhereClause::Error variant and have the Chalk program clause code decide on a case-by-case basis.

I'm not actually sure what the best behavior is; I think it should be 'whatever makes the most code type-check', but actually both approaches can lead to errors (leaving out the clause can cause more ambiguities).

Finally, this problem probably becomes much less important the more correct rust-analyzer's name resolution becomes, so maybe the best answer is 'whatever is simplest' ;)