| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2019-10-04 | Rollup merge of #4509 - sinkuu:redundant_clone_fix, r=llogiq | Phil Hansch | -205/+717 | |
| Fix false-positive of redundant_clone and move to clippy::perf This PR introduces dataflow analysis to `redundant_clone` lint to filter out borrowed variables, which had been incorrectly detected. Depends on https://github.com/rust-lang/rust/pull/64207. changelog: Moved `redundant_clone` lint to `perf` group # What this lint catches ## `clone`/`to_owned` ```rust let s = String::new(); let t = s.clone(); ``` ```rust // MIR _1 = String::new(); _2 = &_1; _3 = clone(_2); // (*) ``` We can turn this `clone` call into a move if 1. `_2` is the sole borrow of `_1` at the statement `(*)` 2. `_1` is not used hereafter ## `Deref` + type-specific `to_owned` method ```rust let s = std::path::PathBuf::new(); let t = s.to_path_buf(); ``` ```rust // MIR _1 = PathBuf::new(); _2 = &1; _3 = call deref(_2); _4 = _3; // Copies borrow StorageDead(_2); _5 = Path::to_path_buf(_4); // (*) ``` We can turn this `to_path_buf` call into a move if 1. `_3` `_4` are the sole borrow of `_1` at `(*)` 2. `_1` is not used hereafter # What this PR introduces 1. `MaybeStorageLive` that determines whether a local lives at a particular location 2. `PossibleBorrowerVisitor` that constructs [`TransitiveRelation`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/transitive_relation/struct.TransitiveRelation.html) of possible borrows, e.g. visiting `_2 = &1; _3 = &_2:` will result in `_3 -> _2 -> _1` relation. Then `_3` and `_2` will be counted as possible borrowers of `_1` in the sole-borrow analysis above. | ||||
| 2019-10-04 | Auto merge of #4624 - sinkuu:workaround_cargo, r=llogiq | bors | -3/+14 | |
| Workaround cargo issue on appveyor Use absolute paths for `cargo` and `rustfmt` to workaround https://github.com/rust-lang/cargo/issues/7475. Appveyor passed on my fork: https://ci.appveyor.com/project/sinkuu/rust-clippy/builds/27870367 changelog: none | ||||
| 2019-10-04 | Use home::cargo_home | Shotaro Yamada | -1/+3 | |
| 2019-10-04 | Workaround cargo bug on Windows | Shotaro Yamada | -3/+12 | |
| 2019-10-03 | extern rustc_index | Shotaro Yamada | -5/+4 | |
| 2019-10-03 | Add comments | Shotaro Yamada | -14/+41 | |
| 2019-10-03 | Resolve reviews | Shotaro Yamada | -14/+12 | |
| 2019-10-03 | Apply suggestion | Shotaro Yamada | -2/+1 | |
| Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com> | ||||
| 2019-10-03 | Test fixes | Shotaro Yamada | -51/+59 | |
| 2019-10-03 | Add run-rustfix | Shotaro Yamada | -97/+241 | |
| 2019-10-03 | Fix false-positive of redundant_clone and move to clippy::perf | Shotaro Yamada | -76/+413 | |
| 2019-10-02 | Auto merge of #4599 - lzutao:zero-ptr-suggestion, r=flip1995 | bors | -23/+69 | |
| Add suggestion for zero-ptr lint changelog: Improve suggestion of `zero_ptr` lint | ||||
| 2019-10-02 | Auto merge of #4603 - rust-lang:needless-doc-main, r=flip1995 | bors | -12/+55 | |
| New lint: needless_doc_main changelog: Add `needless_doc_main` lint | ||||
| 2019-10-02 | Add suggestion for zero-ptr lint | Lzu Tao | -23/+69 | |
| 2019-10-02 | New lint: needless_doc_main | Andre Bogus | -12/+55 | |
| 2019-10-02 | Auto merge of #4590 - flip1995:ice_4579, r=Manishearth | bors | -8/+23 | |
| Fix ICE #4579 Fixes #4579 Fixes #4584 r? @phansch changelog: Fix ICE caused by Clippys const-utils | ||||
| 2019-10-02 | Disable hyper and futures-rs integration tests | flip1995 | -4/+4 | |
| 2019-10-02 | Fix ICE #4579 | flip1995 | -4/+6 | |
| 2019-10-02 | Add regression test for ICE #4579 | flip1995 | -0/+13 | |
| 2019-10-01 | Merge pull request #4606 from Manishearth/rustup | Manish Goregaokar | -75/+2 | |
| Fix some tests | ||||
| 2019-10-01 | Remove tests that only ICE on CI | Manish Goregaokar | -65/+0 | |
| 2019-10-01 | Allow const_err in out_of_bounds_indexing tests | Manish Goregaokar | -12/+4 | |
| 2019-10-01 | Merge pull request #4604 from Manishearth/rustup | Manish Goregaokar | -8/+10 | |
| Rustup to rustc 1.40.0-nightly (702b45e40 2019-10-01) | ||||
| 2019-10-01 | Use new spans for expansion checking in loop lints | Manish Goregaokar | -8/+10 | |
| 2019-09-29 | Auto merge of #4601 - lzutao:clean-up-unused-vars, r=phansch | bors | -48/+23 | |
| Clean up some unused vars changelog: none | ||||
| 2019-09-29 | Clean up some unused vars | Lzu Tao | -48/+23 | |
| 2019-09-29 | Auto merge of #4600 - lzutao:rustup-63492, r=oli-obk | bors | -1/+0 | |
| Rustup rust-lang/rust#63492 changelog: none | ||||
| 2019-09-29 | Rustup rust-lang/rust#63492 | Lzu Tao | -1/+0 | |
| 2019-09-29 | Auto merge of #4593 - james9909:fix-multiple-inherent-impls, r=llogiq | bors | -2/+29 | |
| Fix false positive in `multiple_inherent_impl` changelog: Fix false positive in `multiple_inherent_impl` by ignoring impls derived from macros. Closes #4578. | ||||
| 2019-09-28 | Auto merge of #4594 - matthiaskrgr:rustup_18, r=phansch | bors | -2/+2 | |
| rustup https://github.com/rust-lang/rust/pull/64781/ cc https://github.com/rust-lang/rust/issues/64867 changelog: none | ||||
| 2019-09-28 | rustup https://github.com/rust-lang/rust/pull/64781/ | Matthias Krüger | -2/+2 | |
| cc https://github.com/rust-lang/rust/issues/64867 | ||||
| 2019-09-27 | Ignore impls derived from macros | James Wang | -2/+29 | |
| 2019-09-27 | Auto merge of #4591 - flip1995:rustup, r=flip1995 | bors | -982/+927 | |
| Rustup to rust-lang/rust#64813 cc rust-lang/rust#64843 changelog: none | ||||
| 2019-09-27 | Remove clippy::author attribute from trailing_zeroes test | flip1995 | -22/+5 | |
| 2019-09-27 | Move author issue test to author subdir | flip1995 | -0/+0 | |
| 2019-09-27 | Fix author lint | flip1995 | -81/+43 | |
| 2019-09-27 | Rustup to rust-lang/rust#64813 | flip1995 | -910/+910 | |
| 2019-09-27 | Auto merge of #4589 - mikerite:booleans-refactor-20190925, r=phansch | bors | -8/+4 | |
| Refactor `booleans` Remove unused output from `suggest(..)` changelog: none | ||||
| 2019-09-27 | Refactor `booleans` | Michael Wright | -8/+4 | |
| Remove unused output from `suggest(..)` | ||||
| 2019-09-27 | Auto merge of #4585 - michaelsproul:arith-assign-op, r=llogiq | bors | -10/+82 | |
| Detect mutating arithmetic in integer_arithmetic restriction lint changelog: detect mutating arithmetic (like +=) in `integer_arithmetic` restriction lint | ||||
| 2019-09-27 | Detect assignment ops in integer_arithmetic | Michael Sproul | -10/+82 | |
| 2019-09-26 | Auto merge of #4582 - matthiaskrgr:rustup_17, r=Manishearth | bors | -3/+3 | |
| rustup https://github.com/rust-lang/rust/pull/64515 changelog: none | ||||
| 2019-09-26 | rustup https://github.com/rust-lang/rust/pull/64515 | Matthias Krüger | -3/+3 | |
| changelog: none | ||||
| 2019-09-26 | Auto merge of #4581 - Manishearth:osx-enable, r=matthiaskrgr | bors | -2/+0 | |
| Re enable OSX builders Fixes #4576 changelog: none | ||||
| 2019-09-26 | Re enable OSX builders | Manish Goregaokar | -2/+0 | |
| Fixes #4576 | ||||
| 2019-09-26 | Auto merge of #4580 - lzutao:rustup, r=flip1995 | bors | -125/+124 | |
| Rustup rust-lang/rust#64513 changelog: none | ||||
| 2019-09-26 | Remove unused import | Lzu Tao | -1/+0 | |
| 2019-09-26 | Rustup https://github.com/rust-lang/rust/pull/64513 | Lzu Tao | -124/+124 | |
| 2019-09-26 | Auto merge of #4568 - mikerite:fix-4548, r=flip1995 | bors | -55/+102 | |
| Fix `nonminimal-bool` false positive Closes #4548 Closes #3847 changelog: Fix `nonminimal-bool` false positive | ||||
| 2019-09-26 | Auto merge of #4569 - james9909:add-comparison-chain, r=oli-obk | bors | -107/+362 | |
| Add a new lint for comparison chains changelog: Adds a new lint: `comparison_chain`. `comparison_chain` lints all `if` conditional chains where all the conditions are binary comparisons on the same two operands and will suggest a rewrite with `match`. Closes #4531. | ||||
