-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Borrow error when yielding with nested generators #45093
Copy link
Copy link
Closed
Labels
A-coroutinesArea: CoroutinesArea: CoroutinesA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-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-coroutinesArea: CoroutinesArea: CoroutinesA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-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.
Hi, I got some feedback regarding the generator feature that is currently in nightly.
I am testing whether it is possible to yield out of a generator while another generator is in scope, for example:
However I am getting:
rustc:
rustc 1.22.0-nightly (05cbece09 2017-10-06)I am not sure what borrow this error is talking about.
Is
sub_generatornot owned?Is there an intention to support such use cases?