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

Let dead_code lint work on #[instrument]ed functions #3108

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

9999years
Copy link
Contributor

@9999years 9999years commented Oct 17, 2024

Motivation

#[instrument]ed functions never trigger a dead_code lint.

Closes (partially?) #1366

Solution

Include all of the input tokens in the output. In particular, the brace tokens surrounding the function body, the parenthesis surrounding the function parameters, and the angle brackets surrounding the generics must be included.

Prior art: andrewhickman/fn-error-context@cfa749a

@9999years 9999years requested review from hawkw, davidbarsky and a team as code owners October 17, 2024 02:22
@9999years 9999years force-pushed the fix-dead-code branch 2 times, most recently from 3a36bb1 to b1af999 Compare October 17, 2024 02:24
@9999years 9999years changed the title Let dead_code lint work on #[instrumented functions Let dead_code lint work on #[instrument]ed functions Oct 21, 2024
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.

1 participant