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: Apply fake return edge only to async fns #2437

Open
wants to merge 1 commit into
base: v0.1.x
Choose a base branch
from

Commits on Jan 9, 2023

  1. attributes: Apply fake return edge only to async fns

    The fake return edge was added in tokio-rs#2270 to improve type
    errors in instrumented async functions. However, it meant that the user
    block was being modified outside of `gen_block`. This created a negative
    interaction with tokio-rs#1614, which suppressed a clippy lint
    internally while explicitly enabling it on the user block. The installed
    fake return edge generated this same lint, but the user had no way to
    suppress it: lint directives above the instrumentation were ignored
    because of the internal suppression, and lints inside the user block
    could not influence the fake return edge's scope.
    
    We now avoid modifying the user block outside of `gen_block`, and
    restrict the fake return edge to async functions. We also apply the same
    clippy lint suppression technique to the installed fake return edge.
    
    Closes tokio-rs#2410.
    str4d committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    67f25c5 View commit details
    Browse the repository at this point in the history