impl FnOnce hidden type captures more than the closure itself #124413
Labels
C-bug
Category: This is a bug.
F-lifetime_capture_rules_2024
`#![feature(lifetime_capture_rules_2024)]`
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected both methods to compile, but only the dyn version does.
The error says:
The error says that the closure captures lifetime
'a
, although the closure in the dyn version is the same and compiles successfully without capturing'a
Tried both current stable and nightly
playground
The text was updated successfully, but these errors were encountered: