-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Not desugaring to HRTB for closure argument #73433
Copy link
Copy link
Open
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
My understanding was that
FnMut(&T)desugars tofor<'a> FnMut(&'a T). In this instance, it is seemingly not doing so. If you comment out line 44 then this compiles. Why is themapfunction triggering the incorrect (?) desugaring, and how can I fix it?(Playground)
Errors:
Possibly related: #70263