-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
-Zdrop-tracking doesn't work if the value is borrowed #101135
Copy link
Copy link
Open
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-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-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-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.
I tried this code with
-Zdrop-tracking:I expected to see this happen: this should compiler, as
-Zdrop-trackingshould see that we drop the non-Sendtype before the yield point.Instead, this happened: this does not compile with "future cannot be sent between threads safely" pointing to the
NonSendtype.If I comment the
use_non_send(&non_send);line it works fine.I don't know if this is supposed to work but this looks like a bug.
Meta
rustc --version --verbose: