Coercing higher ranked associated functions into a function pointer requires wrapping in a closure #140663
Labels
A-coercions
Area: implicit and explicit `expr as Type` coercions
A-higher-ranked
Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
Playground
I expected the associated function to be coercible into a function pointer directly or for a diagnostic to tell me to wrap the function in a closure to fix the error.
Instead, I got a confusing compiler error which lead me to think that the
for<'_>
was wrong, which doesn't seem to be the case.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: