-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rename AssocKind::Method to AssocKind::Fn #70643
Conversation
r?@eddyb |
ty::AssocKind::Const => "const", | ||
ty::AssocKind::Method => "method", | ||
ty::AssocKind::Fn => "method", |
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.
Another mention of "method", although this entire module might need a thorough de-method-izing.
@@ -250,9 +250,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
// This function checks if the method isn't static and takes other arguments than `self`. |
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.
The doc comment suggests to me this function is misused, because it doesn't actually check that.
It doesn't check fn_has_self_parameter
at all.
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.
It also use at https://github.com/rust-lang/rust-clippy/blob/c211cea3e99e04c2980a853b6637de22881b72eb/clippy_lints/src/len_zero.rs#L127.
I think if it does have problems, we should fix them in another PR.
0423786
to
be5c4b3
Compare
r? @eddyb |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
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.
LGTM
r=me on the implementation, r? @estebank on the changed diagnostics |
☔ The latest upstream changes (presumably #70692) made this pull request unmergeable. Please resolve the merge conflicts. |
5a9a124
to
f19fd6e
Compare
Resolved conflicts, @estebank could you please take a look? |
@estebank Ping~ |
r?@varkor, could you please take a look ? |
@bors retry |
@Rustin-Liu: 🔑 Insufficient privileges: not in try users |
The error is this:
|
@eddyb Thanks for your reply. But I think this ignore is correct, because this file have 3177 lines. So I have no idea about why it failed. And tidy check successed in my computer. |
r+ on the diagnostics changes.
It could be that the file has changed in master since you opened the PR and makes the check unnecessary going forward. When CI runs it tests against current master instead of against your PR's parent commit to catch logic regressions that would happen when merging. That would explain tidy succeeding in your machine. You could try to rebase against master and rerun tidy to see if it fails locally. |
f19fd6e
to
eeb5450
Compare
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
eeb5450
to
b07e7fe
Compare
@bors r+ |
📌 Commit b07e7fe has been approved by |
☀️ Test successful - checks-azure |
📣 Toolstate changed by #70643! Tested on commit 513a647. 💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq). |
Tested on commit rust-lang/rust@513a647. Direct link to PR: <rust-lang/rust#70643> 💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq). 💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq).
Thank you all for your reply, it is very helpful to me. |
rustup rust-lang/rust#70643 changelog: none
Changes: ```` Rename dummy_hir_id -> parent_hir_id rustup rust-lang#71116 Change default many single char names threshold Better precedence case management + more tests Use only check_expr with parent expr and precedence Check for Deref trait impl + add fixed version Report using stmts and expr + tests Global rework + fix imports Working basic dereference clip Add test for zero single char names Make the single char threshold strict inequality large_enum_variant: Report sizes of variants Refactor: Use rustc's `match_def_path` deps: bump compiletest-rs from 0.4 to 0.5 rustup rust-lang#70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test result_map_unit_fn: Fix incorrect UI tests Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes rust-lang#5405: redundant clone false positive with arrays Disallow bit-shifting in `integer_arithmetic` lint update lints cargo dev fmt Make use of Option/Result diagnostic items Make use of some existing diagnostic items Say that diagnostic items are preferred over paths verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self Update doc generation script Add lint on large const arrays Make the epsilon note spanless Split check_fn function Indicate when arrays are compared in error message Make epsilon note spanless when comparing arrays Add float cmp const tests for arrays Add float cmp tests for arrays Handle constant arrays with single value Don't show comparison suggestion for arrays Allow for const arrays of zeros Handle evaluating constant index expression Add handling of float arrays to miri_to_const Update stderr of float_cmp test Update field names in is_float Add tests for float in array comparison Add lint when comparing floats in an array ```` Fixes rust-lang#71114
submodules: update clippy from af5940b to d236b30 Changes: ```` rustup rust-lang#70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes rust-lang#5405: redundant clone false positive with arrays update lints verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self ```` Fixes rust-lang#71114
…=estebank Fix `has_no_input_arg` check and rename it to `has_only_self_parameter` Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fixes rust-lang#70643 (comment).
Changes: ```` Rename dummy_hir_id -> parent_hir_id rustup rust-lang/rust#71116 Change default many single char names threshold Better precedence case management + more tests Use only check_expr with parent expr and precedence Check for Deref trait impl + add fixed version Report using stmts and expr + tests Global rework + fix imports Working basic dereference clip Add test for zero single char names Make the single char threshold strict inequality large_enum_variant: Report sizes of variants Refactor: Use rustc's `match_def_path` deps: bump compiletest-rs from 0.4 to 0.5 rustup rust-lang/rust#70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test result_map_unit_fn: Fix incorrect UI tests Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes rust-lang#5405: redundant clone false positive with arrays Disallow bit-shifting in `integer_arithmetic` lint update lints cargo dev fmt Make use of Option/Result diagnostic items Make use of some existing diagnostic items Say that diagnostic items are preferred over paths verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self Update doc generation script Add lint on large const arrays Make the epsilon note spanless Split check_fn function Indicate when arrays are compared in error message Make epsilon note spanless when comparing arrays Add float cmp const tests for arrays Add float cmp tests for arrays Handle constant arrays with single value Don't show comparison suggestion for arrays Allow for const arrays of zeros Handle evaluating constant index expression Add handling of float arrays to miri_to_const Update stderr of float_cmp test Update field names in is_float Add tests for float in array comparison Add lint when comparing floats in an array ```` Fixes #71114
Part of #60163.
#60163 (comment)