-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc_lint: handle more method calls in unconditional_recursion. #26783
Conversation
☔ The latest upstream changes (presumably #26757) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #27066) made this pull request unmergeable. Please resolve the merge conflicts. |
ping @huonw (also needs rebase) |
bcx.fcx.param_substs)) | ||
def::DefMethod(meth_did) => { | ||
let method_item = bcx.tcx().impl_or_trait_item(meth_did); | ||
fn_callee(bcx, match method_item.container() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move the match to a temporary variable (i.e. to not be inline in the function call)?
r=me with a rebase and the nit. |
@bors r=huonw |
📌 Commit 585f0e9 has been approved by |
After #26694, the overloaded operator and "impl not known at method lookup time" cases started triggering the lint.
I've also added checks for overloaded autoderef and method calls via paths (i.e.
T::method()
).All new 8 test cases did not trigger the lint before #26694.
r? @huonw