A bound like T::Item: Debug can slow down trait solving a lot because it will currently result in a search through all Debug impls (this case will be hit), see e.g. #6362.
https://github.com/rust-lang/chalk/pull/589 should solve this, but the changes in https://github.com/rust-lang/chalk/pull/638 should probably also fix it in most cases. At some point, I'd like to remove the above-mentioned unrestricted search case (i.e. return an empty list instead), which would make sure we don't get bad performance at the cost of getting wrong results if we encounter that situation (which we shouldn't).
A bound like
T::Item: Debug
can slow down trait solving a lot because it will currently result in a search through allDebug
impls (this case will be hit), see e.g. #6362. https://github.com/rust-lang/chalk/pull/589 should solve this, but the changes in https://github.com/rust-lang/chalk/pull/638 should probably also fix it in most cases. At some point, I'd like to remove the above-mentioned unrestricted search case (i.e. return an empty list instead), which would make sure we don't get bad performance at the cost of getting wrong results if we encounter that situation (which we shouldn't).