When we have a type annotation with placeholders and we assign to it the result of a trait implementation call, if there is a single possible trait implementation we can use its type in the type annotation type.
Fixes #5299
Checklist
[x] I have linked to any relevant issues.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
Description
When we have a type annotation with placeholders and we assign to it the result of a trait implementation call, if there is a single possible trait implementation we can use its type in the type annotation type.
Fixes #5299
Checklist
Breaking*
orNew Feature
labels where relevant.