about summary refs log tree commit diff
path: root/clippy_lints/src
AgeCommit message (Collapse)AuthorLines
2018-11-25Fix some warnings related to SelfGuillem Nieto-7/+7
2018-11-25Rename some symbolsGuillem Nieto-57/+60
Renamed some symbols in order to make them a little bit more accurate.
2018-11-25Split lint into slow and unsafe vector initalizationGuillem Nieto-28/+72
2018-11-25Add unsafe set_len initializationGuillem Nieto-7/+33
2018-11-25Add slow zero-filled vector initialization lintGuillem Nieto-0/+307
Add lint to detect slow zero-filled vector initialization. It detects when a vector is zero-filled with extended with `repeat(0).take(len)` or `resize(len, 0)`. This zero-fillings are usually slower than simply using `vec![0; len]`.
2018-11-24Merge pull request #3439 from dtolnay/npbvOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer-3/+2
Downgrade needless_pass_by_value to allow by default
2018-11-23rustup https://github.com/rust-lang/rust/pull/54071/Matthias Krüger-2/+2
2018-11-22Merge pull request #3447 from phansch/small_renameOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer-3/+3
s/file_map/source_map
2018-11-22Merge branch 'master' into version_idsOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer-50/+99
2018-11-22s/file_map/source_mapPhilipp Hansch-3/+3
2018-11-22rust-lang-nursery/rust-clippy => rust-lang/rust-clippyMatthias Krüger-7/+6
2018-11-21Address 'clippy::single-match' dogfood lintWayne Warren-6/+4
2018-11-21Fix nitPhilipp Krones-1/+1
Co-Authored-By: waynr <wayne.warren.s@gmail.com>
2018-11-21Address travis CI lint failureWayne Warren-1/+1
2018-11-21issue#3318 run trivially_copy_pass_by_ref for traitsWayne Warren-41/+93
2018-11-21Enable rustup clippy to refer to the correct documentationOliver Scherer-2/+5
2018-11-21rustup https://github.com/rust-lang/rust/pull/52591Matthias Krüger-2/+2
2018-11-21Downgrade needless_pass_by_value to allow by defaultDavid Tolnay-3/+2
I noticed that I suppress this lint in many of my projects. https://github.com/search?q=needless_pass_by_value+user%3Adtolnay&type=Code https://github.com/search?q=needless_pass_by_value+user%3Aserde-rs&type=Code Upon further inspection, this lint has a *long* history of false positives (and several remaining). Generally I feel that this lint is the definition of pedantic and should not be linted by default. #[derive(Debug)] enum How { ThisWay, ThatWay, } // Are we really better off forcing the call sites to write f(&_)...? fn f(how: How) { println!("You want to do it {:?}", how); } fn main() { f(How::ThatWay); }
2018-11-19Merge #3432bors[bot]-4/+6
3432: match_ref_pats: don't emit suggestions inside of a macro r=Manishearth a=flip1995 Fixes #2636 Co-authored-by: flip1995 <hello@philkrones.com>
2018-11-17remove unused allow() attributes, NFCMatthias Krüger-18/+3
2018-11-15Don't emit suggestion when inside of a macroflip1995-4/+6
2018-11-15rustup https://github.com/rust-lang/rust/pull/55852/Matthias Krüger-1/+1
2018-11-15Merge #3419bors[bot]-0/+118
3419: Linter to check that all common metadata is included r=flip1995 a=ysimonson Addresses https://github.com/rust-lang-nursery/rust-clippy/issues/1793 This is not ready to be merged yet. First the associated changes to `cargo_metadata` need to be merged: https://github.com/oli-obk/cargo_metadata/pull/55 Co-authored-by: Yusuf Simonson <simonson@gmail.com>
2018-11-14Fix "too" -> "foo" typo in format.rsAnton-1/+1
2018-11-14Fix `use_self` violationMichael Wright-2/+2
2018-11-14Fix wrong suggestion for `redundant_closure_call`Michael Wright-16/+45
Fixes #1684
2018-11-13Check for common metadataYusuf Simonson-0/+118
2018-11-13Fix `use_self` false positive on `use` statementsMichael Wright-0/+5
2018-11-10Fix `use_self` false positiveMichael Wright-15/+24
This fixes the first error reported in issue #3410.
2018-11-06Remove `+` from `has_unary_equivalent`Michael Wright-3/+2
Rust doesn't has a unary + operator!
2018-11-06Merge branch 'master' into fix-missing-comma-fpMichael Wright-70/+102
2018-11-05RIIR update lints: Add check mode (update_lints.py rewrite complete)Philipp Hansch-6/+6
This finishes up the rewrite of `update_lints.py` in Rust. More specifically, this * adds the `--check` flag and handling to clippy_dev * tracks file changes over the different calls to `replace_region_in_file` * only writes changes to files if the `--check` flag is *not* used * runs `./util/dev update_lints --check` on CI instead of the old script * replaces usage of the `update_lints.py` script with an error `./util/dev update_lints` behaves 99% the same as the python script. The only difference that I'm aware of is an ordering change to `clippy_lints/src/lib.rs` because underscores seem to be sorted differently in Rust and in Python. :checkered_flag:
2018-11-05Merge #3353bors[bot]-62/+94
3353: float support added for mistyped_literal_suffixes lint r=mikerite a=Maxgy I implemented the mistyped_literal_suffixes lint for float literals. ``` #![allow(unused_variables)] fn main() { let x = 1E2_32; let x = 75.22_64; } ``` Given the above, the additional check suggests the variables to be written as `let x = 1E2_f32` and `let x = 75.22_f64`. Fixes #3167 Co-authored-by: Maxwell Anderson <maxwell.brayden.anderson@gmail.com>
2018-11-04rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)Matthias Krüger-2/+2
2018-11-04changed into_iter to iter and fixed a lint checkMaxwell Anderson-3/+3
2018-11-04Fix `collapsible_if` errorMichael Wright-15/+13
2018-11-04Fix `possible_missing_comma` false positivesMichael Wright-13/+23
`possible_missing_comma` should only trigger when the binary operator has unary equivalent. Otherwise, it's not possible to insert a comma without breaking compilation. The operators identified were `+`, `&`, `*` and `-`. This fixes the specific examples given in issues #3244 and #3396 but doesn't address the conflict this lint has with the style of starting a line with a binary operator.
2018-11-03rustup https://github.com/rust-lang/rust/pull/55330/Matthias Krüger-2/+2
2018-11-03Merge #3400bors[bot]-22/+29
3400: Fix a false-positive of needless_borrow r=phansch a=sinkuu Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
2018-11-02Also lint cfg_attr(.., rustfmt::skip)flip1995-2/+2
2018-11-02Differ between inner and outer attributesflip1995-5/+48
2018-11-02Add cfg_attr(rustfmt) lintflip1995-2/+34
2018-11-02Addressed comments.kennytm-5/+5
2018-11-02Fix dogfood error.kennytm-20/+20
2018-11-02Added lints `into_iter_on_ref` and `into_iter_on_array`. Fix #1565.kennytm-1/+120
2018-11-02Allow single_match_elseflip1995-1/+2
2018-11-02Fix typosflip1995-1/+1
2018-11-02Fix dogfood errorflip1995-1/+1
2018-11-02Fix typo and indentationflip1995-2/+2
2018-11-02Add new lint: unknwon_clippy_lintsgflip1995-7/+87