]>
git.lizzy.rs Git - rust.git/log
mgr-inz-rafal [Mon, 23 Mar 2020 20:00:02 +0000 (21:00 +0100)]
Provide appropriate suggestion
mgr-inz-rafal [Mon, 23 Mar 2020 19:29:12 +0000 (20:29 +0100)]
Initial lint without suggestion
bors [Mon, 23 Mar 2020 15:17:09 +0000 (15:17 +0000)]
Auto merge of #5350 - ThibsG:FixSingleBindingClosure, r=flip1995
Fix single binding closure
Fix the `match_single_binding` lint when triggered inside a closure.
Fixes: #5347
changelog: Improve suggestion for [`match_single_binding`]
bors [Mon, 23 Mar 2020 14:41:57 +0000 (14:41 +0000)]
Auto merge of #5361 - matthiaskrgr:rustup_37, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69968/
changelog: none
Matthias Krüger [Mon, 23 Mar 2020 14:21:46 +0000 (15:21 +0100)]
rustup https://github.com/rust-lang/rust/pull/69968/
bors [Sun, 22 Mar 2020 18:54:58 +0000 (18:54 +0000)]
Auto merge of #5353 - flip1995:conf_doc, r=Manishearth
Fix documentation generation for configurable lints
In #5135, the configuration macro changed, but the documentation generation script wasn't updated. This PR catches up on this.
[Preview](https://flip1995.github.io/rust-clippy/master/index.html)
r? @Manishearth
changelog: Document configuration options of lints again.
flip1995 [Sun, 22 Mar 2020 17:15:06 +0000 (18:15 +0100)]
Fix documentation generation for configurable lints
ThibsG [Sat, 21 Mar 2020 19:26:55 +0000 (20:26 +0100)]
Fix single binding in closure
bors [Fri, 20 Mar 2020 12:45:30 +0000 (12:45 +0000)]
Auto merge of #5323 - rabisg0:fix/5284, r=flip1995
Improvement: Don't show function body in needless_lifetimes
Changes the span on which the lint is reported to point to only the
function return type instead of the entire function body.
Fixes #5284
changelog: none
bors [Thu, 19 Mar 2020 15:26:41 +0000 (15:26 +0000)]
Auto merge of #5342 - flip1995:rollup-77s2pmt, r=flip1995
Rollup of 4 pull requests
Successful merges:
- #5326 (rustup https://github.com/rust-lang/rust/pull/69838)
- #5333 (rustup https://github.com/rust-lang/rust/pull/69189)
- #5336 (rustup https://github.com/rust-lang/rust/pull/69920/)
- #5341 (Rustup to rust-lang/rust#66131)
Failed merges:
r? @ghost
changelog: none
flip1995 [Thu, 19 Mar 2020 12:58:08 +0000 (13:58 +0100)]
Get integration test binary from deps dir
cc rust-lang/cargo#7965
Philipp Krones [Thu, 19 Mar 2020 14:00:32 +0000 (15:00 +0100)]
Rollup merge of #5341 - flip1995:rustup, r=flip1995
Rustup to rust-lang/rust#66131
changelog: none
Philipp Krones [Thu, 19 Mar 2020 14:00:31 +0000 (15:00 +0100)]
Rollup merge of #5336 - matthiaskrgr:rustup_35, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69920/
changelog: none
Philipp Krones [Thu, 19 Mar 2020 14:00:30 +0000 (15:00 +0100)]
Rollup merge of #5333 - matthiaskrgr:rustup_34, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69189
rustups https://github.com/rust-lang/rust/pull/69189 which is part of https://github.com/rust-lang/rust/pull/70085
(at least I think this is the only pr that changes clippy test stdout)
changelog: none
Philipp Krones [Thu, 19 Mar 2020 14:00:29 +0000 (15:00 +0100)]
Rollup merge of #5326 - matthiaskrgr:rustup_33, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69838
changelog: none
flip1995 [Thu, 19 Mar 2020 13:33:10 +0000 (14:33 +0100)]
Rustup to rust-lang/rust#66131
Matthias Krüger [Wed, 18 Mar 2020 22:45:02 +0000 (23:45 +0100)]
rustup https://github.com/rust-lang/rust/pull/69920/
Rabi Guha [Mon, 16 Mar 2020 11:44:24 +0000 (17:14 +0530)]
Improvement: Don't show function body in needless_lifetimes
Changes the span on which the lint is reported to point to only the
function return type instead of the entire function body.
Fixes #5284
bors [Wed, 18 Mar 2020 20:34:58 +0000 (20:34 +0000)]
Auto merge of #5335 - flip1995:changelog, r=Manishearth
Update changelog to 1.43.0 beta
In the beta changelog update, I accidentally used the commit of the 1.43.0 beta, instead of the 1.42.0 beta. I fixed this in this PR.
[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)
r? @Manishearth
changelog: none
bors [Wed, 18 Mar 2020 14:56:05 +0000 (14:56 +0000)]
Auto merge of #5329 - matthiaskrgr:int_arith_on_ref_5328, r=flip1995
integer_arithmetic: detect integer arithmetic on references.
changelog: integer_arithmetic fix false negatives with references on integers
Fixes #5328
Matthias Krüger [Wed, 18 Mar 2020 14:41:42 +0000 (15:41 +0100)]
tests: arithmetic: split into integer_arithmetic and float_arithmetic files.
bors [Wed, 18 Mar 2020 14:34:34 +0000 (14:34 +0000)]
Auto merge of #5331 - matthiaskrgr:lint_docs1, r=flip1995
clean up a few lint docs
changelog: none
flip1995 [Wed, 18 Mar 2020 14:27:25 +0000 (15:27 +0100)]
Fix limit-stderr-files test
flip1995 [Wed, 18 Mar 2020 14:24:48 +0000 (15:24 +0100)]
Split up checked_unwrap test further
bors [Wed, 18 Mar 2020 13:58:41 +0000 (13:58 +0000)]
Auto merge of #5330 - matthiaskrgr:newlint_expl, r=flip1995
new_lint.rs: encourage authors to write more detailed code samples in lint descriptions (linted as well as fixed code)
changelog: none
flip1995 [Wed, 18 Mar 2020 13:49:40 +0000 (14:49 +0100)]
Update changelog to 1.43.0 beta
Matthias Krüger [Tue, 17 Mar 2020 22:32:30 +0000 (23:32 +0100)]
integer_arithmetic: detect integer arithmetic on references.
Also fixes the same for float_arithmetic.
changelog: integer_arithmetic,float_arithmetic: fix false negatives with references on integers
Fixes #5328
Matthias Krüger [Wed, 18 Mar 2020 02:27:05 +0000 (03:27 +0100)]
rustup https://github.com/rust-lang/rust/pull/69189
rustups https://github.com/rust-lang/rust/pull/69189 which is part of https://github.com/rust-lang/rust/pull/70085
(at least I think this is the only pr that changes clippy test stdout)
Matthias Krüger [Wed, 18 Mar 2020 01:50:39 +0000 (02:50 +0100)]
clean up a few lint docs
Matthias Krüger [Wed, 18 Mar 2020 00:43:39 +0000 (01:43 +0100)]
new_lint.rs: encourage authors to write more detailed code samples in lint descriptions (linted as well as fixed code)
changelog: none
Matthias Krüger [Tue, 17 Mar 2020 09:18:22 +0000 (10:18 +0100)]
rustup https://github.com/rust-lang/rust/pull/69838
bors [Mon, 16 Mar 2020 17:44:54 +0000 (17:44 +0000)]
Auto merge of #5324 - matthiaskrgr:rustup_32, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69738
changelog: none
Matthias Krüger [Mon, 16 Mar 2020 15:00:16 +0000 (16:00 +0100)]
rustup https://github.com/rust-lang/rust/pull/69738
bors [Mon, 16 Mar 2020 12:41:04 +0000 (12:41 +0000)]
Auto merge of #5322 - phansch:or_patterns, r=matthiaskrgr
Make use of `or_patterns` feature
changelog: none
bors [Mon, 16 Mar 2020 12:11:00 +0000 (12:11 +0000)]
Auto merge of #5321 - matthiaskrgr:rustup_31, r=phansch
rustup https://github.com/rust-lang/rust/pull/68944
changelog: none
Matthias Krüger [Sun, 15 Mar 2020 22:41:20 +0000 (23:41 +0100)]
rustup https://github.com/rust-lang/rust/pull/68944
Philipp Hansch [Mon, 16 Mar 2020 06:23:03 +0000 (07:23 +0100)]
Make use of `or_patterns` feature
bors [Sun, 15 Mar 2020 20:57:14 +0000 (20:57 +0000)]
Auto merge of #5318 - matthiaskrgr:rustup_30, r=flip1995
rustup https://github.com/rust-lang/rust/pull/69589/
changelog: none
Matthias Krüger [Sun, 15 Mar 2020 17:23:43 +0000 (18:23 +0100)]
rustup https://github.com/rust-lang/rust/pull/69589/
bors [Sun, 15 Mar 2020 12:57:30 +0000 (12:57 +0000)]
Auto merge of #5316 - lzutao:osstr, r=phansch
Don't convert Path to lossy str
changelog: none
bors [Sat, 14 Mar 2020 21:45:38 +0000 (21:45 +0000)]
Auto merge of #5317 - JohnTitor:rustup, r=matthiaskrgr
Rustup to rust-lang/rust#69076
changelog: none
Yuki Okushi [Sat, 14 Mar 2020 20:26:32 +0000 (05:26 +0900)]
Rustup to rust-lang/rust#69076
Lzu Tao [Sat, 14 Mar 2020 14:30:08 +0000 (14:30 +0000)]
Don't convert Path to lossy str
Lzu Tao [Sat, 14 Mar 2020 15:17:52 +0000 (15:17 +0000)]
Use `into_path`
Lzu Tao [Sat, 14 Mar 2020 12:29:48 +0000 (19:29 +0700)]
Use pattern matching instead of manually checking condition
bors [Sat, 14 Mar 2020 12:17:09 +0000 (12:17 +0000)]
Auto merge of #5312 - joshtriplett:wildcard-prelude-documentation, r=flip1995
Document that wildcard_imports doesn't warn about `use ...::prelude::*;`
changelog: Improve [`wildcard_imports`] documentation
bors [Sat, 14 Mar 2020 09:23:16 +0000 (09:23 +0000)]
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
Remove git2 dependency.
This removes the `git2` dependency (used in the integration test). Updating git2 is awkward because both cargo and clippy have to be updated in sync, so this removes that requirement. It didn't look like it was using the git2 library for any particular reason, so this just launches the `git` executable, which should be available more or less everywhere.
This unblocks updating Cargo.
changelog: none
Philipp Krones [Sat, 14 Mar 2020 09:22:49 +0000 (10:22 +0100)]
Fix typo
Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
Eric Huss [Sat, 14 Mar 2020 01:22:51 +0000 (18:22 -0700)]
Remove git2 dependency.
Josh Triplett [Fri, 13 Mar 2020 17:07:11 +0000 (17:07 +0000)]
Document that wildcard_imports doesn't warn about `use ...::prelude::*;`
bors [Fri, 13 Mar 2020 00:07:33 +0000 (00:07 +0000)]
Auto merge of #5308 - flip1995:changelog, r=Manishearth
Update Changelog
I also changed the formatting of the changelog for the beta changelog. I can also do this for all the previous releases, if this formatting gets accepted.
[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)
r? @Manishearth
changelog: none
bors [Thu, 12 Mar 2020 20:22:31 +0000 (20:22 +0000)]
Auto merge of #5304 - sinkuu:redundant_clone_not_consumed, r=flip1995
Extend `redundant_clone` to the case that cloned value is not consumed
Fixes #5303.
---
changelog: Extend `redundant_clone` to the case that cloned value is not consumed
bors [Thu, 12 Mar 2020 20:05:38 +0000 (20:05 +0000)]
Auto merge of #5307 - JohnTitor:rename-method, r=flip1995
Rustup to rust-lang/rust#69674
changelog: none
flip1995 [Thu, 12 Mar 2020 19:54:25 +0000 (20:54 +0100)]
Change changelog formatting
flip1995 [Thu, 12 Mar 2020 20:02:08 +0000 (21:02 +0100)]
Update changelog_update doc to reflect the actual ordering of the changelog
flip1995 [Thu, 12 Mar 2020 20:01:19 +0000 (21:01 +0100)]
Update CHANGELOG.md
Yuki Okushi [Thu, 12 Mar 2020 19:56:55 +0000 (04:56 +0900)]
Rustup to rust-lang/rust#69674
Shotaro Yamada [Thu, 12 Mar 2020 17:06:47 +0000 (02:06 +0900)]
Use visit_place
Shotaro Yamada [Thu, 12 Mar 2020 16:25:18 +0000 (01:25 +0900)]
Check for mutation
Shotaro Yamada [Thu, 12 Mar 2020 15:54:40 +0000 (00:54 +0900)]
Only fires on temporaries
`let y = x.clone()` cannot be turned into `let y = x` without moving x,
regardless of whether `y` is consumed or not.
Shotaro Yamada [Thu, 12 Mar 2020 15:31:09 +0000 (00:31 +0900)]
Extend `redundant_clone` to the case that cloned value is not consumed
bors [Tue, 10 Mar 2020 22:35:15 +0000 (22:35 +0000)]
Auto merge of #5272 - jmeyers35:file_read_lint, r=flip1995
add lint on File::read_to_string and File::read_to_end
Adds lint `verbose_file_reads` which checks for use of File::read_to_end and File::read_to_string.
Closes https://github.com/rust-lang/rust-clippy/issues/4916
changelog: add lint on File::{read_to_end, read_to_string}
bors [Tue, 10 Mar 2020 22:02:41 +0000 (22:02 +0000)]
Auto merge of #5300 - JohnTitor:edition-flag, r=flip1995
Use `edition:2018` flag more widely
Now we recommend using `// edition:2018`, so let's use it more widely.
Also replace a too old example with new one in the docs.
changelog: none
Jacob Meyers [Tue, 10 Mar 2020 09:41:24 +0000 (05:41 -0400)]
add CR feedback
Yuki Okushi [Tue, 10 Mar 2020 21:35:46 +0000 (06:35 +0900)]
Improve documentation
Yuki Okushi [Tue, 10 Mar 2020 21:35:07 +0000 (06:35 +0900)]
Use `edition:2018` flag more widely
bors [Tue, 10 Mar 2020 21:30:44 +0000 (21:30 +0000)]
Auto merge of #5298 - rust-lang:needless_doc_main_code, r=flip1995,Manishearth
needless_doc_main: only check rust code
This fixes #5280 by checking the language attribute on code blocks.
---
changelog: none
Manish Goregaokar [Tue, 10 Mar 2020 21:30:07 +0000 (14:30 -0700)]
Update tests/ui/needless_doc_main.rs
Co-Authored-By: Philipp Krones <hello@philkrones.com>
bors [Tue, 10 Mar 2020 21:05:46 +0000 (21:05 +0000)]
Auto merge of #5299 - JohnTitor:contrib, r=flip1995
Clean-up docs
Fixes #5268
changelog: none
Yuki Okushi [Tue, 10 Mar 2020 20:55:25 +0000 (05:55 +0900)]
Move links to the end of each chapter on adding_lints
Yuki Okushi [Tue, 10 Mar 2020 20:40:53 +0000 (05:40 +0900)]
Move links to the end of each chapter on CONTRIBUTING
Yuki Okushi [Tue, 10 Mar 2020 20:21:28 +0000 (05:21 +0900)]
Clean-up adding_lints.md
Yuki Okushi [Tue, 10 Mar 2020 09:50:06 +0000 (18:50 +0900)]
Clean-up CONTRIBUTING.md
Andre Bogus [Tue, 10 Mar 2020 19:19:37 +0000 (20:19 +0100)]
needless_doc_main: only check rust code
bors [Tue, 10 Mar 2020 12:25:07 +0000 (12:25 +0000)]
Auto merge of #5296 - sinkuu:fix_ice_trivial_bounds, r=flip1995
Fix ICE with trivial_bounds feature
https://github.com/rust-lang/rust/issues/69874#issuecomment-
596890446
changelog: Fix ICE with trivial_bounds feature
bors [Tue, 10 Mar 2020 10:37:51 +0000 (10:37 +0000)]
Auto merge of #5297 - JohnTitor:shadow, r=phansch
Use `node_type_opt` over `node_type`
Fix ICE reported in rust-lang/rust#69873.
changelog: Fix ICE in checking bindings
Yuki Okushi [Tue, 10 Mar 2020 09:18:34 +0000 (18:18 +0900)]
Use `node_type_opt` over `node_type`
Shotaro Yamada [Tue, 10 Mar 2020 04:27:33 +0000 (13:27 +0900)]
Fix doc
Shotaro Yamada [Tue, 10 Mar 2020 04:17:15 +0000 (13:17 +0900)]
Fix ICE with trivial_bounds feature
bors [Tue, 10 Mar 2020 00:09:26 +0000 (00:09 +0000)]
Auto merge of #5295 - matthiaskrgr:lints_readme, r=flip1995
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy
changelog: none
Matthias Krüger [Tue, 10 Mar 2020 00:05:17 +0000 (01:05 +0100)]
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy.
bors [Mon, 9 Mar 2020 23:46:50 +0000 (23:46 +0000)]
Auto merge of #5277 - chrissimpkins:rustc-dev-guide-transition, r=flip1995
Update rustc-guide to rustc-dev-guide
The rustc-guide is being renamed to the rustc-dev-guide. The discussion is in rust-lang/rustc-guide#470.
This PR revises rustc-guide to rustc-dev-guide in the Readme Markdown file.
Transition tracker: rust-lang/rustc-guide#602
changelog: none
Chris Simpkins [Mon, 9 Mar 2020 21:58:39 +0000 (17:58 -0400)]
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
bors [Mon, 9 Mar 2020 19:51:13 +0000 (19:51 +0000)]
Auto merge of #5292 - jpospychala:map-placeholder, r=flip1995
Improve placeholder in map_unit_fn
Instead of using `_` as a default placeholder use `a`.
fixes #5180
changelog: Improve default placeholder in map_unit_fn
Jacek Pospychala [Sun, 8 Mar 2020 22:43:40 +0000 (23:43 +0100)]
Improve placeholder in map_unit_fn
bors [Mon, 9 Mar 2020 17:25:09 +0000 (17:25 +0000)]
Auto merge of #5287 - matthiaskrgr:pat_isref, r=flip1995
redundant_pattern: take binding (ref, ref mut) into account in suggestion
fixes #5271
changelog: redundant_pattern: take binding (ref, ref mut) into account in suggestion (#5271)
bors [Mon, 9 Mar 2020 17:09:38 +0000 (17:09 +0000)]
Auto merge of #5286 - matthiaskrgr:delay_vec_creation, r=flip1995
check_pat: delay creation of the "normal" vec until we reach the branch where it is actually needed
changelog: none
bors [Mon, 9 Mar 2020 16:04:26 +0000 (16:04 +0000)]
Auto merge of #5291 - ThibsG:FixSingleBinding, r=flip1995
Fix match single binding when in a let stmt
Fix bad suggestion when `match_single_binding` lints when inside a local (let) statement.
Fixes #5267
changelog: none
ThibsG [Sun, 8 Mar 2020 21:57:35 +0000 (22:57 +0100)]
Fix match single binding when in a let stmt
bors [Mon, 9 Mar 2020 14:29:40 +0000 (14:29 +0000)]
Auto merge of #5285 - matthiaskrgr:dep_it, r=flip1995
deps: bump itertools 0.8 -> 0.9
changelog: none
bors [Mon, 9 Mar 2020 13:11:23 +0000 (13:11 +0000)]
Auto merge of #5290 - polybuildr:map-message, r=phansch
Improve error messages for {option,result}_map_unit_fn
Instead of saying "unit function", use the phrase the description uses: "function that returns the unit type".
Fixes #5180.
changelog: Improve error messages for {option,result}_map_unit_fn
bors [Sun, 8 Mar 2020 22:24:26 +0000 (22:24 +0000)]
Auto merge of #5289 - polybuildr:setup, r=matthiaskrgr
Mention the setup instructions in CONTRIBUTING
Multiple people seem to have missed this based on questions asked in the Discord channel. Might as well mention it up front.
changelog: none
Vivek Ghaisas [Sun, 8 Mar 2020 21:28:06 +0000 (21:28 +0000)]
Improve error messages for {option,result}_map_unit_fn
Instead of saying "unit function", use the phrase the description
uses: "function that returns the unit type".
Fixes #5180.
Vivek Ghaisas [Sun, 8 Mar 2020 20:57:42 +0000 (20:57 +0000)]
Mention the setup instructions in CONTRIBUTING
Multiple people seem to have missed this based on questions asked in the
Discord channel. Might as well mention it up front.
Matthias Krüger [Sun, 8 Mar 2020 09:00:23 +0000 (10:00 +0100)]
redundant_pattern: take binding (ref, ref mut) into account in suggestion.
fixes #5271
Matthias Krüger [Sun, 8 Mar 2020 01:50:33 +0000 (02:50 +0100)]
check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed
Matthias Krüger [Sun, 8 Mar 2020 00:33:17 +0000 (01:33 +0100)]
deps: bump itertools 0.8 -> 0.9
changelog: none
Jacob Meyers [Thu, 5 Mar 2020 02:13:57 +0000 (21:13 -0500)]
add lint on File::read_to_string and File::read_to_end
Chris Simpkins [Fri, 6 Mar 2020 04:32:04 +0000 (23:32 -0500)]
transition rustc-guide to rustc-dev-guide
bors [Thu, 5 Mar 2020 18:25:07 +0000 (18:25 +0000)]
Auto merge of #5276 - flip1995:macro_use, r=flip1995
Rename macro_use_import -> macro_use_imports
I missed this during review of #5230. We can just do this, without deprecating the old name, since this lint didn't hit nightly rustc yet.
changelog: none