Inference worse in method signature using associated type than with new generic type parameter eq-constrained to the associated type #45462
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-inference
Area: Type inference
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
With this signature
This code
Gets
error[E0619]: the type of this value must be known in this context
.But it works fine with the seemingly-equivalent signature
Since
acc
andinit
must have the same type in both cases, shouldn't both signatures work?Full repro: https://play.rust-lang.org/?gist=f8d2baeae64b17344e1cf27673a2e905&version=nightly
The text was updated successfully, but these errors were encountered: