Overloaded call inferred to be through Fn when only FnOnce works #38305
Labels
A-closures
Area: Closures (`|…| { … }`)
C-bug
Category: This is a bug.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Repro: https://is.gd/AbO8K4
A wrapper around a closure
F
implementsFnOnce
,FnMut
andFn
whereF
does. However, when the wrapper is created with a closure which implements onlyFnOnce
, and then the wrapper is called, the compiler expects the closure to implementFnMut
orFn
.cc @eddyb (discussed on IRC)
The text was updated successfully, but these errors were encountered: