-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
#[track_caller] does nothing on async fns #78840
Copy link
Copy link
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)AsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaAsyncAwait-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-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)AsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaAsyncAwait-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-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried:
I expected the seventh line to be the panic location, but I got this:
With
RUST_BACKTRACE=1Playground (tried using nightly 2020-11-06 a601302)
I can achieve the result I expected by implementing a
Futuremanually:Output:
Playground
I noticed that (in the backtrace) the compiler generated a closure (
Generator?) for theasync fn, so #74042 may be related.@rustbot modify labels: A-async-await A-attributes