]>
git.lizzy.rs Git - rust.git/log
flip1995 [Tue, 14 May 2019 12:13:23 +0000 (14:13 +0200)]
Also hash mem::discriminant in hash_stmt
Oliver Scherer [Wed, 8 May 2019 09:34:35 +0000 (11:34 +0200)]
mem::discriminant trumps manual discriminant hashing
Oliver Scherer [Tue, 7 May 2019 12:48:00 +0000 (14:48 +0200)]
Properly hash enums
bors [Tue, 14 May 2019 11:26:16 +0000 (11:26 +0000)]
Auto merge of #4084 - mikerite:fix-4019, r=oli-obk
Fix 4019
Fixes #4019
bors [Tue, 14 May 2019 09:02:01 +0000 (09:02 +0000)]
Auto merge of #4093 - rust-lang:rustup, r=oli-obk
Rustup to rustc 1.36.0-nightly (
1764b2972 2019-05-12)
Oliver Scherer [Tue, 14 May 2019 08:06:21 +0000 (10:06 +0200)]
Rustfmt all the things
Oliver Scherer [Tue, 14 May 2019 08:03:16 +0000 (10:03 +0200)]
Clippy dogfood
Oliver Scherer [Tue, 14 May 2019 07:41:29 +0000 (09:41 +0200)]
Update for compiletest changes
Oliver Scherer [Mon, 13 May 2019 23:34:08 +0000 (01:34 +0200)]
Use symbols instead of strings
Manish Goregaokar [Mon, 13 May 2019 18:29:54 +0000 (11:29 -0700)]
Rustup to rustc 1.36.0-nightly (
1764b2972 2019-05-12)
bors [Sun, 12 May 2019 19:37:39 +0000 (19:37 +0000)]
Auto merge of #4089 - flip1995:id_conv_reg_test, r=Manishearth
Add regression test for identity_conversion FP
cc #3913 #4082 #3936
changelog: none
flip1995 [Sun, 12 May 2019 19:32:29 +0000 (21:32 +0200)]
Add regression test for identity_conversion FP
bors [Sun, 12 May 2019 17:36:39 +0000 (17:36 +0000)]
Auto merge of #4087 - phansch:move_tests, r=matthiaskrgr
UI test cleanup: Extract many_single_char_names tests
changelog: none
cc #2038, #4086
Philipp Hansch [Sun, 12 May 2019 11:01:43 +0000 (13:01 +0200)]
UI test cleanup: Extract many_single_char_names tests
bors [Sun, 12 May 2019 13:50:57 +0000 (13:50 +0000)]
Auto merge of #4085 - phansch:empty_loop_tests, r=matthiaskrgr
Add tests for empty_loop lint
changelog: none
Closes #4072
Philipp Hansch [Sun, 12 May 2019 10:10:23 +0000 (12:10 +0200)]
Add tests for empty_loop lint
bors [Sun, 12 May 2019 11:06:29 +0000 (11:06 +0000)]
Auto merge of #4082 - Manishearth:macro-check-split, r=oli-obk
Make most macro checks also check for desugarings
We should audit the macro checks one by one and re-add `in_macro`. I suspect it's applicable to most of them.
fixes https://github.com/rust-lang/rust-clippy/issues/4081
Michael Wright [Sun, 12 May 2019 08:32:19 +0000 (10:32 +0200)]
Fix comments; minor refactoring
Michael Wright [Sun, 12 May 2019 08:18:38 +0000 (10:18 +0200)]
Fix #4019
Michael Wright [Sun, 12 May 2019 07:32:39 +0000 (09:32 +0200)]
Move ctor tests from methods.rs to or_fun_calls.rs
Manish Goregaokar [Sun, 12 May 2019 03:41:30 +0000 (20:41 -0700)]
Add in_macro again
Manish Goregaokar [Sun, 12 May 2019 03:40:05 +0000 (20:40 -0700)]
Rename in_macro to in_macro_or_desugar
bors [Sat, 11 May 2019 11:35:54 +0000 (11:35 +0000)]
Auto merge of #4080 - rust-lang:rustup, r=oli-obk
Rustup to rustc 1.36.0-nightly (
acc7e652f 2019-05-10)
Fixes breakages from https://github.com/rust-lang/rust/pull/59288
Not finished yet, help appreciated.
Todo:
- [x] Needs to build
- [x] Util should handle DropTemps, https://github.com/rust-lang/rust-clippy/pull/4080#discussion_r283079202
- [x] Author lint should spit out higher::if_block checks
- [x] Unsure what to do in consts.rs
- [x] Needs to pass tests
Manish Goregaokar [Sat, 11 May 2019 06:36:49 +0000 (23:36 -0700)]
Start handling desugarings in author lint
Manish Goregaokar [Sat, 11 May 2019 06:19:35 +0000 (23:19 -0700)]
Ignore desugarings in macro checks
Manish Goregaokar [Sat, 11 May 2019 02:40:05 +0000 (19:40 -0700)]
Add IfDesugar to desugaring_name
Manish Goregaokar [Sat, 11 May 2019 02:37:37 +0000 (19:37 -0700)]
Fix consts.rs
Manish Goregaokar [Sat, 11 May 2019 02:34:47 +0000 (19:34 -0700)]
More uses of higher::if_block
Manish Goregaokar [Sat, 11 May 2019 02:23:35 +0000 (19:23 -0700)]
Remove some unnecessary If arms
Manish Goregaokar [Sat, 11 May 2019 02:23:26 +0000 (19:23 -0700)]
Fix needless_bool.rs
Manish Goregaokar [Sat, 11 May 2019 02:18:17 +0000 (19:18 -0700)]
Fix question_mark.rs
Manish Goregaokar [Sat, 11 May 2019 02:17:30 +0000 (19:17 -0700)]
Fix shadow.rs
Manish Goregaokar [Sat, 11 May 2019 02:13:15 +0000 (19:13 -0700)]
Fix unwrap.rs
Manish Goregaokar [Sat, 11 May 2019 02:10:47 +0000 (19:10 -0700)]
Add util function for desugaring if block
bors [Thu, 9 May 2019 17:09:54 +0000 (17:09 +0000)]
Auto merge of #4073 - euclio:serde-derive, r=Manishearth
use `derive` feature over `serde_derive` crate
changelog: replace `serde_derive` dependency with `serde`'s derive feature
Andy Russell [Thu, 9 May 2019 17:05:34 +0000 (13:05 -0400)]
use `derive` feature over `serde_derive` crate
bors [Thu, 9 May 2019 04:49:51 +0000 (04:49 +0000)]
Auto merge of #4069 - mikerite:while_loop_test_split, r=phansch
Reorganize "while loop" tests
cc #2038
changelog: none
Michael Wright [Thu, 9 May 2019 03:55:24 +0000 (05:55 +0200)]
Remove unused attrs in while_let_on_iterator tests
Michael Wright [Thu, 9 May 2019 03:54:05 +0000 (05:54 +0200)]
Fix while_let_on_iterator.stderr
Michael Wright [Thu, 9 May 2019 03:50:58 +0000 (05:50 +0200)]
Merge branch 'master' into while_loop_test_split
Michael Wright [Wed, 8 May 2019 07:29:27 +0000 (09:29 +0200)]
Rename while_loop tests to while_let_on_iterator
Michael Wright [Wed, 8 May 2019 07:19:08 +0000 (09:19 +0200)]
Split while_loop.rs tests
Split out while_let_loop tests into separate file.
Split ice-360 out into separate file.
bors [Wed, 8 May 2019 05:06:28 +0000 (05:06 +0000)]
Auto merge of #4068 - matthiaskrgr:rustup_3, r=Manishearth
rustup https://github.com/rust-lang/rust/pull/60586
cc https://github.com/rust-lang/rust/issues/60623
changelog: none
Matthias Krüger [Wed, 8 May 2019 04:58:37 +0000 (06:58 +0200)]
rustup https://github.com/rust-lang/rust/pull/60586
cc https://github.com/rust-lang/rust/issues/60623
bors [Tue, 7 May 2019 04:35:42 +0000 (04:35 +0000)]
Auto merge of #4064 - mikerite:fix-771, r=matthiaskrgr
Add test for #771.
Closes #771
<!--
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo fmt`
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR -->
changelog: none
Michael Wright [Tue, 7 May 2019 04:28:51 +0000 (06:28 +0200)]
Add test for #771.
Closes #771
bors [Mon, 6 May 2019 07:47:59 +0000 (07:47 +0000)]
Auto merge of #4063 - mikerite:while_loop_clean_up, r=Manishearth
Clean up while_loop tests
At some stage, we started adding test cases inside the function which tests
refutable patterns. This commits splits those test cases out into separate
functions.
Michael Wright [Mon, 6 May 2019 05:49:45 +0000 (07:49 +0200)]
Clean up while_loop tests
At some stage, we started adding test cases inside the function which tests
refutable patterns. This commits splits those test cases out into separate
functions.
bors [Sat, 4 May 2019 08:17:03 +0000 (08:17 +0000)]
Auto merge of #4061 - rust-lang:rustup, r=phansch
Rustup to rustc 1.36.0-nightly (
13fde05b1 2019-05-03)
Trying to deal with changes from https://github.com/rust-lang/rust/pull/60462
Moved from https://github.com/rust-lang/rust-clippy/pull/4060 so everyone can collab on the rustup branch.
Matthias Krüger [Sat, 4 May 2019 00:03:12 +0000 (02:03 +0200)]
Rustup to rustc 1.36.0-nightly (
13fde05b1 2019-05-03)
bors [Fri, 3 May 2019 17:58:36 +0000 (17:58 +0000)]
Auto merge of #4059 - rustic-games:into_iter_on_array/doc-fix, r=flip1995
Fix link in into_iter_on_array documentation
The non-inline variant wasn't being rendered correctly.
see: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array
Jean Mertz [Fri, 3 May 2019 15:38:13 +0000 (17:38 +0200)]
Fix link in into_iter_on_array documentation
The non-inline variant wasn't being rendered correctly.
see: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array
bors [Fri, 3 May 2019 07:26:55 +0000 (07:26 +0000)]
Auto merge of #4053 - euclio:too-many-args-span, r=flip1995
remove function body from "too many args" span
changelog: Remove the function body from the "too many arguments" span.
Andy Russell [Wed, 1 May 2019 19:32:54 +0000 (15:32 -0400)]
remove function body from "too many args" span
bors [Thu, 2 May 2019 08:45:02 +0000 (08:45 +0000)]
Auto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995
Fix #4033 search_is_some
Fixes #4033.
Suggest `any(|x| ..)` instead of `any(|&x| ..)` for `find(|&x| ..).is_some()` (Lint [search_is_some](https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some))
FnDecl of `find`:
```rust
fn find<P>(&mut self, mut p: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool
```
FnDecl of `any`:
```rust
fn any<F>(&mut self, mut f: F) -> bool where
F: FnMut(Self::Item) -> bool
```
If match on `|&_|` in closure of `find`, only use `|_|` in the suggestion.
PS. It's the first time that I have used the `hir` API, please correct me if there is any mistake 😺
bors [Thu, 2 May 2019 07:03:28 +0000 (07:03 +0000)]
Auto merge of #4035 - JoshMcguigan:useless_let_if_seq-3043, r=oli-obk
useless_let_if_seq handle interior mutability
fixes #3043
This passes all tests, including a new one specifically dealing with a type with interior mutability. The main thing I'm unsure of is whether the span I used in the call to `is_freeze` is the most appropriate span to use, or if it matters.
bors [Wed, 1 May 2019 21:07:44 +0000 (21:07 +0000)]
Auto merge of #4056 - matthiaskrgr:rustup__, r=Manishearth
more Use->DropTemps fixes
changelog: none
Matthias Krüger [Wed, 1 May 2019 20:52:19 +0000 (22:52 +0200)]
more Use->DropTemps fixes
Matthias Krüger [Wed, 1 May 2019 20:18:05 +0000 (22:18 +0200)]
rustup https://github.com/rust-lang/rust/pull/60417/
cc https://github.com/rust-lang/rust/issues/60448
bors [Wed, 1 May 2019 18:42:58 +0000 (18:42 +0000)]
Auto merge of #4048 - matthiaskrgr:driver_version, r=phansch
clippy-driver: use rustc_tools_util to get version info.
changelog: make "clippy-driver -V" output the same information as "cargo clippy -V"
Matthias Krüger [Tue, 30 Apr 2019 09:10:31 +0000 (11:10 +0200)]
clippy-driver: use rustc_tools_util to get version info.
This will add git hash information to `clippy-driver -V` output.
bors [Wed, 1 May 2019 01:55:14 +0000 (01:55 +0000)]
Auto merge of #4051 - yaahallo:master, r=Manishearth
use clippy-preview instead of clippy in dogfood
changelog: switch dogfood tests to use cargo clippy-preview
closes #4050
Jane Lusby [Wed, 1 May 2019 01:29:25 +0000 (18:29 -0700)]
use clippy-preview instead of clippy in cargo
airt [Tue, 30 Apr 2019 20:41:00 +0000 (04:41 +0800)]
check closure arguments before use it
airt [Tue, 30 Apr 2019 20:03:51 +0000 (04:03 +0800)]
format code
bors [Tue, 30 Apr 2019 20:00:33 +0000 (20:00 +0000)]
Auto merge of #4039 - andrehjr:add-find-map-lints, r=flip1995
Add lints for find_map
changelog: adds lints for find_map and filter_map_next. Closes issue #3474
Hope I got everything correctly this time! Let me know if I missed something.
André Luis Leal Cardoso Junior [Sun, 28 Apr 2019 18:19:05 +0000 (15:19 -0300)]
Update find(p).map(p) occurrences to use find_map(p)
André Luis Leal Cardoso Junior [Sat, 27 Apr 2019 22:06:35 +0000 (19:06 -0300)]
Add lints for find_map
airt [Tue, 30 Apr 2019 19:09:27 +0000 (03:09 +0800)]
fix suggestion for search_is_some
airt [Tue, 30 Apr 2019 17:08:16 +0000 (01:08 +0800)]
fix suggestion for search_is_some naively
airt [Tue, 30 Apr 2019 17:06:15 +0000 (01:06 +0800)]
change |&x| to |x| in stderr file
bors [Tue, 30 Apr 2019 07:20:58 +0000 (07:20 +0000)]
Auto merge of #4045 - matthiaskrgr:RTU, r=phansch
rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.
changelog: rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.
bors [Tue, 30 Apr 2019 05:34:55 +0000 (05:34 +0000)]
Auto merge of #4047 - rust-lang:rustup, r=Centril
Rustup to rustc 1.36.0-nightly (
f843ad60e 2019-04-30)
None
Manish Goregaokar [Tue, 30 Apr 2019 05:31:39 +0000 (22:31 -0700)]
Rustup to rustc 1.36.0-nightly (
f843ad60e 2019-04-30)
bors [Mon, 29 Apr 2019 07:03:54 +0000 (07:03 +0000)]
Auto merge of #4032 - phansch:add_tests, r=phansch
Add two more tests for redundant_closure
These two cases were fixed by #4008.
Closes #1439
changelog: none
bors [Mon, 29 Apr 2019 05:43:23 +0000 (05:43 +0000)]
Auto merge of #4046 - rust-lang:rustup, r=phansch
Rustup to rustc 1.36.0-nightly (
c7fcbfbf1 2019-04-29)
Updates to pass the lint introduced in https://github.com/rust-lang/rust/pull/60317
r? @oli-obk @mikerite
Manish Goregaokar [Mon, 29 Apr 2019 04:58:03 +0000 (21:58 -0700)]
Rustup to rustc 1.36.0-nightly (
c7fcbfbf1 2019-04-29)
See https://github.com/rust-lang/rust/pull/60317
bors [Sun, 28 Apr 2019 21:34:09 +0000 (21:34 +0000)]
Auto merge of #4044 - matthiaskrgr:travis_sort_jobs, r=phansch
travis: sort integration test jobs so that the jobs taking the most time are run first
changelog: none
Matthias Krüger [Sun, 28 Apr 2019 18:07:49 +0000 (20:07 +0200)]
rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.
Matthias Krüger [Sun, 28 Apr 2019 18:45:10 +0000 (20:45 +0200)]
travis: sort integration test jobs so that the jobs taking the most time are run first
bors [Sun, 28 Apr 2019 18:39:00 +0000 (18:39 +0000)]
Auto merge of #4043 - rust-lang:map-clone-iter, r=matthiaskrgr
Suggest .copied() for map_clone on iterators too
fixes https://github.com/rust-lang/rust-clippy/issues/3958
changelog: Make `map_clone` suggest the newly-stable `Iterator::copied()` when applicable
r? @mikerite @matthiaskrgr
Manish Goregaokar [Sun, 28 Apr 2019 18:14:39 +0000 (11:14 -0700)]
Suggest .copied() for map_clone on iterators too
bors [Sun, 28 Apr 2019 17:29:17 +0000 (17:29 +0000)]
Auto merge of #4042 - matthiaskrgr:toml_update, r=Manishearth
deps: bump toml from 0.4 to 0.5
changelog: none
Matthias Krüger [Sun, 28 Apr 2019 17:24:36 +0000 (19:24 +0200)]
deps: bump toml from 0.4 to 0.5
bors [Sun, 28 Apr 2019 15:19:12 +0000 (15:19 +0000)]
Auto merge of #4040 - mikerite:fix-build-
20190428 , r=Manishearth
Fix breakage due to rust-lang/rust#60225
Wrote this up before I saw that Manish already started on a fix in #4038. It no doubt contains errors. Feel free to close.
Michael Wright [Sun, 28 Apr 2019 07:11:20 +0000 (09:11 +0200)]
Fix breakage due to rust-lang/rust#60225
Philipp Hansch [Thu, 25 Apr 2019 19:46:34 +0000 (21:46 +0200)]
Add two more tests for redundant_closure
These two cases were fixed by #4008.
Closes #1439
changelog: none
Josh Mcguigan [Fri, 26 Apr 2019 02:41:23 +0000 (19:41 -0700)]
cargo fmt
Josh Mcguigan [Fri, 26 Apr 2019 02:07:01 +0000 (19:07 -0700)]
useless_let_if_seq handle interior mutability
bors [Thu, 25 Apr 2019 18:13:47 +0000 (18:13 +0000)]
Auto merge of #4008 - g-bartoszek:boxed-fnmut, r=phansch
Do not trigger redundant_closure for non-function types
fixes #3898
Added a check for the entity being called in the closure body to be a FnDef. This way lint does not trigger for ADTs (Box) but I'm not sure if it's correct and not too restrictive.
<!--
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo fmt`
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR -->
changelog: Fix false positive in `redundant_closure` pertaining to non-function types
bors [Thu, 25 Apr 2019 10:37:30 +0000 (10:37 +0000)]
Auto merge of #4026 - cemiloten:working-on-#3981, r=flip1995
Attempt to fix #3981
Fixes #3981
Hi, hopefully this is correct, happy to have feedback.
changelog: Don't trigger `unnecessary_cast` inside a macro
cemil [Wed, 24 Apr 2019 14:02:38 +0000 (16:02 +0200)]
Ignore unnecessary cast if inside macro
bors [Thu, 25 Apr 2019 09:16:46 +0000 (09:16 +0000)]
Auto merge of #4029 - phansch:update_pulldown_cmark, r=oli-obk
Update pulldown_cmark to 0.5
We now no longer have to use our own wrapper around `Parser` and can use
the new `OffsetIter`.
changelog: none
bors [Thu, 25 Apr 2019 06:38:38 +0000 (06:38 +0000)]
Auto merge of #4028 - phansch:skip_appveyor_on_pr_pushes, r=phansch
Only run AppVeyor on r+, try and the master branch
As it is right now, there is only one worker available in the `rust-lang-libs`
AppVeyor project and there are other repos as well that we share this worker
with. This has been a problem for us because we sometimes hit a bors timeout if there
are too many builds queued up.
To improve the situation, I think we could try to use AppVeyor a bit less
often. The average PR is not going to break windows related things anyway, so
it should be fine to run it on r+/try/master only.
changelog: none
bors [Thu, 25 Apr 2019 05:33:37 +0000 (05:33 +0000)]
Auto merge of #4030 - phansch:rustup190425, r=Manishearth
Rustup for https://github.com/rust-lang/rust/pull/59042
changelog: none
Philipp Hansch [Thu, 25 Apr 2019 05:29:23 +0000 (07:29 +0200)]
Rustup for https://github.com/rust-lang/rust/pull/59042
Philipp Hansch [Wed, 24 Apr 2019 05:47:01 +0000 (07:47 +0200)]
Update pulldown_cmark to 0.5
We now no longer have to use our own wrapper around `Parser` and can use
the new `OffsetIter`.
bors [Wed, 24 Apr 2019 20:40:36 +0000 (20:40 +0000)]
Auto merge of #4027 - kraai:remove-approx_constant-known-problems, r=phansch
Remove approx_constant known problems
Fixes #4025.
changelog: Remove `approx_constant`'s documentation's "Known problems" section.
Philipp Hansch [Wed, 24 Apr 2019 18:25:59 +0000 (20:25 +0200)]
Only run AppVeyor on r+, try and the master branch
As it is right now, there is only one worker available in the `rust-lang-libs`
AppVeyor project and there are other repos as well that we share this worker
with. This has been a problem for us because we sometimes hit a bors timeout if there
are too many builds queued up.
To improve the situation, I think we could try to use AppVeyor a bit less
often. The average PR is not going to break windows related things anyway, so
it should be fine to run it on r+/try/master only.
bors [Wed, 24 Apr 2019 17:16:59 +0000 (17:16 +0000)]
Auto merge of #4023 - phansch:add_test, r=flip1995
Add test for or_fun_call macro suggestion
changelog: none
Closes #1018