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

unnecessary_lazy_eval show suggestions on multiline lint #8543

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

dswij
Copy link
Member

@dswij dswij commented Mar 15, 2022

Closes #8393

changelog: [unnecessary_lazy_eval] now shows suggestions for long-line lints

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 15, 2022
),
applicability,
);
if let hir::ExprKind::MethodCall(_, _, span) = expr.kind {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not the best way, but I'd prefer not to change this

fn method_call<'tcx>(recv: &'tcx hir::Expr<'tcx>) -> Option<(&'tcx str, &'tcx [hir::Expr<'tcx>], Span)> {

Copy link
Contributor

Choose a reason for hiding this comment

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

Can the comment about it be added here?

Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

LGTM with nits

),
applicability,
);
if let hir::ExprKind::MethodCall(_, _, span) = expr.kind {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the comment about it be added here?

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Mar 18, 2022

📌 Commit bd888d4 has been approved by giraffate

@bors
Copy link
Contributor

bors commented Mar 18, 2022

⌛ Testing commit bd888d4 with merge 9fd3c2d...

@bors
Copy link
Contributor

bors commented Mar 18, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 9fd3c2d to master...

@bors bors merged commit 9fd3c2d into rust-lang:master Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unnecessary_lazy_evaluations missing / wrong hint information
4 participants