-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Overly conservative async capture analysis when values are borrowed #129325
Copy link
Copy link
Open
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-async-nominatedNominated for discussion during an async working group meeting.Nominated for discussion during an async working group meeting.WG-asyncWorking group: Async & awaitWorking group: Async & await
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-async-nominatedNominated for discussion during an async working group meeting.Nominated for discussion during an async working group meeting.WG-asyncWorking group: Async & awaitWorking group: Async & await
Type
Fields
Give feedbackNo fields configured for issues without a type.
There's probably a bug filed already but this code does not compile, though it really ought to:
I believe the problem is specific to the
&lock, which causes the capture analysis to get nervous -- even thoughlockis dropped. This is distilled from real-world code within Amazon.Error you get today:
I'm nominated for async just to get some eyes on this. I'd be interested to discuss fixes, I have a few thoughts, though I'd have to look at the code too.