Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attributes: fix #[instrument] skipping code when returning pinned futures #1297

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

nightmared
Copy link
Contributor

Fixes #1296.

I had forgotten to use all the input statements in #1228, so we would delete nearly all the statement of sync functions that return a boxed future :/

@nightmared nightmared requested review from davidbarsky, hawkw and a team as code owners March 11, 2021 18:41
@nightmared
Copy link
Contributor Author

As @hawkw pointed out in #1296 (comment), it might be interesting to add tests to prevent such breakage in the future.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thank you!

tracing-attributes/tests/async_fn.rs Outdated Show resolved Hide resolved
@hawkw hawkw changed the title fix #1296 attributes: fix #[instrument] deleting code when returning pinned futures Mar 11, 2021
@hawkw hawkw changed the title attributes: fix #[instrument] deleting code when returning pinned futures attributes: fix #[instrument] skipping code when returning pinned futures Mar 11, 2021
@hawkw
Copy link
Member

hawkw commented Mar 11, 2021

Last CI failure was due to flaky tests, restarted it.

@hawkw hawkw merged commit 57b4a47 into tokio-rs:master Mar 11, 2021
@nightmared nightmared deleted the fix-1296 branch March 11, 2021 19:17
hawkw pushed a commit that referenced this pull request Mar 12, 2021
…utures (#1297)

This backports #1297 from `master`.

Fixes #1296.

I had forgotten to use all the input statements in #1228, so we would
delete nearly all the statement of sync functions that return a boxed
future :/
hawkw pushed a commit that referenced this pull request Mar 12, 2021
…utures (#1297)

This backports #1297 from `master`.

Fixes #1296.

I had forgotten to use all the input statements in #1228, so we would
delete nearly all the statement of sync functions that return a boxed
future :/
hawkw added a commit that referenced this pull request Mar 12, 2021
# 0.1.15 (March 12, 2021)

### Fixed

- `#[instrument]` on functions returning `Box::pin`ned futures incorrectly
  skipping function bodies prior to returning a future ([#1297])

Thanks to @nightmared for contributing to this release!

[#1297]: #1297
hawkw added a commit that referenced this pull request Mar 12, 2021
# 0.1.15 (March 12, 2021)

### Fixed

- `#[instrument]` on functions returning `Box::pin`ned futures incorrectly
  skipping function bodies prior to returning a future ([#1297])

Thanks to @nightmared for contributing to this release!

[#1297]: #1297
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.1.15 (March 12, 2021)

### Fixed

- `#[instrument]` on functions returning `Box::pin`ned futures incorrectly
  skipping function bodies prior to returning a future ([tokio-rs#1297])

Thanks to @nightmared for contributing to this release!

[tokio-rs#1297]: tokio-rs#1297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tracing-attributes 0.1.14 causes variables to be out of scope when they're in scope
2 participants