-
Notifications
You must be signed in to change notification settings - Fork 1.6k
unnecessary_wraps
: do not include the whole body in the lint span
#14777
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
base: master
Are you sure you want to change the base?
Conversation
7800fc7
to
deae5bd
Compare
I'm actually not sure about this one, only spanning the signature imo signifies that the issue is with the function signature, and really the too of the issue is with the returned expression. Isn't there an option to like annotate several unconnected places with span_lint_then? Something like:
Although each option should probably be truncated to guard against really big chains of |
That was the intent: if we assume the code is correct, then the issue is really with the function signature, which requires an Though I agree that a note talking about only @rustbot author |
Reminder, once the PR becomes ready for a review, use |
Done. Example:
@rustbot ready |
Using the function declaration, by stripping the body, is enough to convey the lint message.
deae5bd
to
a1931dd
Compare
Using the function declaration, by stripping the body, is enough to convey the lint message.
changelog: [
unnecessary_wraps
]: do not include the whole body in the lint spanCloses #14773