about summary refs log tree commit diff
path: root/clippy_lints/src/methods
AgeCommit message (Collapse)AuthorLines
2019-11-25fixing a typoAndre Bogus-1/+1
2019-11-25Rustup to rust-lang/rust#64856flip1995-19/+24
2019-11-25Rustup to rust-lang/rust#66671flip1995-3/+3
2019-11-23Auto merge of #4840 - flip1995:rollup-jqk3a3i, r=flip1995bors-1/+1
Rollup of 5 pull requests Successful merges: - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body) - #4766 (Fix false positive in derive_hash_xor_eq) - #4811 (Literal Representation Restructure) - #4820 (doc: fix the comment above the lint function) - #4830 (use more efficient code to generate repeated string) Failed merges: r? @ghost changelog: none
2019-11-23Rollup merge of #4820 - guanqun:comment-fix, r=flip1995Philipp Krones-1/+1
doc: fix the comment above the lint function it's a simple comment fix. --- changelog: none
2019-11-15New lint: zst_offsetAndre Bogus-0/+33
2019-11-16doc: fix the comment above the lint functionGuanqun Lu-1/+1
2019-11-11MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureByManish Goregaokar-6/+6
2019-11-07Deprecate `into_iter_on_array` lintflip1995-41/+4
This lint was uplifted/reimplemented by rustc. Rustup to rust-lang/rust#66017
2019-11-06rustup rust-lang/rust#65776Lzu Tao-3/+3
2019-10-19rustup https://github.com/rust-lang/rust/pull/65535Lzu Tao-1/+1
2019-10-18Split out testsHeinz N. Gies-2/+4
2019-10-18Add expectHeinz N. Gies-1/+86
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-10-17Update help text in `inefficient_to_string`Michael Zhang-1/+1
Co-Authored-By: Manish Goregaokar <manishsmail@gmail.com>
2019-10-16Add `inefficient_to_string` lintHMPerson1-0/+83
2019-10-14new lints around `#[must_use]` fnsAndre Bogus-0/+2
`must_use_unit` lints unit-returning functions with a `#[must_use]` attribute, suggesting to remove it. `double_must_use` lints functions with a plain `#[must_use]` attribute, but which return a type which is already `#[must_use]`, so the attribute has no benefit. `must_use_candidate` is a pedantic lint that lints functions and methods that return some non-unit type that is not already `#[must_use]` and suggests to add the annotation.
2019-10-08Auto merge of #4611 - rust-lang:doc-visibility, r=flip1995bors-1/+1
account for doc visibility This fixes #4608. Also I noticed that the lint failed to look at trait and impl items. There's a small bit of fallout in the code, too, but not enough to warrant its own commit. changelog: check docs of trait items and impl items, also make `missing_safety_doc` account for visibility
2019-10-05Run util/dev fmtflip1995-5/+5
2019-10-05Get rid of rvalue_promotable_map method callflip1995-12/+3
2019-10-02account for doc visibilityAndre Bogus-1/+1
2019-09-27Rustup to rust-lang/rust#64813flip1995-56/+56
2019-09-26Rustup https://github.com/rust-lang/rust/pull/64513Lzu Tao-20/+20
2019-09-11run rustfmtMatthias Krüger-5/+5
2019-09-09Auto merge of #4527 - rust-lang:more-vec-diag-items, r=oli-obkbors-1/+1
Changed more `Vec` paths to diagnostic_items In #4519, I missed a few instances of path matching for `Vec`, so here they are. r? @oli-obk changelog: none
2019-09-09Auto merge of #4522 - mikerite:fix-4514, r=phanschbors-25/+30
Fix `or_fun_call` bad suggestion Closes #4514 changelog: Fix `or_fun_call` bad suggestion
2019-09-09Changed more Vec paths to diagnostic_itemsAndre Bogus-1/+1
2019-09-09Use diagnostic item forAndre Bogus-10/+9
2019-09-08Fix `or_fun_call` bad suggestionMichael Wright-25/+30
Closes #4514
2019-09-04Refactor option handlingJeremy Stucki-8/+5
2019-09-04Auto merge of #4498 - sinkuu:checked_arithmetic_unwrap, r=flip1995bors-0/+207
Add manual_saturating_arithmetic lint changelog: add `manual_saturating_arithmetic` lint Fixes #1557. This lint detects manual saturating arithmetics like `x.checked_add(10u32).unwrap_or(u32::max_value())` and suggests replacing with `x.saturating_add(10u32)`.
2019-09-04Hide variables in doc-testShotaro Yamada-8/+8
2019-09-04Fix doctest and renaming srcShotaro Yamada-6/+8
2019-09-04Add manual_saturating_arithmetic lintShotaro Yamada-0/+205
2019-09-04Auto merge of #4454 - BO41:search_is_some, r=flip1995bors-34/+50
Dereference one less on search_is_some and make it auto-fixable Fixes #4453 changelog: none
2019-09-03Try to fix .fixedBO41-15/+16
2019-09-03lint against `MaybeUninit::uninit().assume_init()`Andre Bogus-0/+65
2019-08-30Rustup to rust-lang/rust#60966flip1995-2/+2
2019-08-29Use the spans returned by utils::method_callsflip1995-22/+28
2019-08-29Dereference one less on search_is_some and make it auto-fixableBO41-8/+17
2019-08-28Replace `Arg` with `Param`Yuki Okushi-5/+5
2019-08-26Auto merge of #4430 - lzutao:defid_trait_alias, r=flip1995bors-1/+4
Account for trait alias when looking for defid I hit the crash on the `expect` call when running clippy on rustc libcore. Hopefully this will fix it. changelog: none
2019-08-26Auto merge of #4436 - BO41:written_as, r=phanschbors-1/+20
Add some "could be written as" examples fixes #4405 changelog: none
2019-08-25Account for trait alias when looking for defidLzu Tao-1/+4
2019-08-24Fix lint docBO41-1/+1
2019-08-23Refactor some minor thingsJeremy Stucki-16/+9
2019-08-23Use more if-chainsJeremy Stucki-36/+42
2019-08-23Refactor 'lint_or_fun_call'Jeremy Stucki-35/+26
2019-08-23Refactor 'check_unwrap_or_default'Jeremy Stucki-33/+26
2019-08-23Refactor 'check_impl_item'Jeremy Stucki-49/+48
2019-08-22Add examples to some complexity lintsBO41-1/+16