Commit Graph

5986 Commits

Author SHA1 Message Date
Manish Goregaokar
da8b56d99a Fix needless_bool.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
09a93291ec Fix question_mark.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
f40c77a776 Fix shadow.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
62897747fd Fix unwrap.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
e7af60f258 Add util function for desugaring if block 2019-05-10 23:40:42 -07:00
bors
c74aac9d0c 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
2019-05-09 17:09:54 +00:00
Andy Russell
9ede56f383
use derive feature over serde_derive crate 2019-05-09 13:05:34 -04:00
bors
d056ea6828 Auto merge of #4069 - mikerite:while_loop_test_split, r=phansch
Reorganize "while loop" tests

cc #2038

changelog: none
2019-05-09 04:49:51 +00:00
Michael Wright
dcfe380de4 Remove unused attrs in while_let_on_iterator tests 2019-05-09 05:58:54 +02:00
Michael Wright
225f86f2c3 Fix while_let_on_iterator.stderr 2019-05-09 05:54:05 +02:00
Michael Wright
983edde284 Merge branch 'master' into while_loop_test_split 2019-05-09 05:50:58 +02:00
Michael Wright
5149ed40a9 Rename while_loop tests to while_let_on_iterator 2019-05-08 09:30:17 +02:00
Michael Wright
1cb94a7e6c Split while_loop.rs tests
Split out while_let_loop tests into separate file.
Split ice-360 out into separate file.
2019-05-08 09:24:24 +02:00
bors
341c96afd3 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
2019-05-08 05:06:28 +00:00
Matthias Krüger
857c2c53bf rustup https://github.com/rust-lang/rust/pull/60586
cc https://github.com/rust-lang/rust/issues/60623
2019-05-08 06:58:37 +02:00
bors
089a7beb7d 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
2019-05-07 04:35:42 +00:00
Michael Wright
87f7eaa2c8 Add test for #771.
Closes #771
2019-05-07 06:28:51 +02:00
bors
e9a3b7c4ee 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.
2019-05-06 07:47:59 +00:00
Michael Wright
a4bba694c0 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.
2019-05-06 07:49:45 +02:00
bors
fc96aa0368 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.
2019-05-04 08:17:03 +00:00
Matthias Krüger
d618637c05 Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03) 2019-05-03 22:28:34 -07:00
bors
19316b4cb5 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
2019-05-03 17:58:36 +00:00
Jean Mertz
ff244b6c43
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
2019-05-03 17:38:13 +02:00
bors
8b906f94f3 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.
2019-05-03 07:26:55 +00:00
Andy Russell
9253506112
remove function body from "too many args" span 2019-05-02 10:36:59 -04:00
bors
8151a17422 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 😺
2019-05-02 08:45:02 +00:00
bors
1cf5d7f04c 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.
2019-05-02 07:03:28 +00:00
bors
2ed0b3bfa0 Auto merge of #4056 - matthiaskrgr:rustup__, r=Manishearth
more Use->DropTemps fixes

changelog: none
2019-05-01 21:07:44 +00:00
Matthias Krüger
f195680edb more Use->DropTemps fixes 2019-05-01 23:04:35 +02:00
Matthias Krüger
24e856f10a rustup https://github.com/rust-lang/rust/pull/60417/
cc https://github.com/rust-lang/rust/issues/60448
2019-05-01 22:18:16 +02:00
bors
990d6833b2 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"
2019-05-01 18:42:58 +00:00
Matthias Krüger
6967cf59a4 clippy-driver: use rustc_tools_util to get version info.
This will add git hash information to `clippy-driver -V` output.
2019-05-01 10:43:16 +02:00
bors
5162ea5d0c 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
2019-05-01 01:55:14 +00:00
Jane Lusby
0df6564d95 use clippy-preview instead of clippy in cargo 2019-04-30 18:29:25 -07:00
airt
d063516c85 check closure arguments before use it 2019-05-01 04:41:00 +08:00
airt
5d6a100f81 format code 2019-05-01 04:03:51 +08:00
bors
e56e325f85 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.
2019-04-30 20:00:33 +00:00
André Luis Leal Cardoso Junior
e428862c95 Update find(p).map(p) occurrences to use find_map(p) 2019-04-30 16:45:32 -03:00
André Luis Leal Cardoso Junior
b411391f8e Add lints for find_map 2019-04-30 16:45:28 -03:00
airt
c3fde34fd5 fix suggestion for search_is_some 2019-05-01 03:11:58 +08:00
airt
bd0b75f6c3 fix suggestion for search_is_some naively 2019-05-01 01:08:16 +08:00
airt
2d4d275519 change |&x| to |x| in stderr file 2019-05-01 01:06:15 +08:00
bors
86f73473c8 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.
2019-04-30 07:20:58 +00:00
bors
d0ff1a585f Auto merge of #4047 - rust-lang:rustup, r=Centril
Rustup to rustc 1.36.0-nightly (f843ad60e 2019-04-30)

None
2019-04-30 05:34:55 +00:00
Manish Goregaokar
83519d3ca0 Rustup to rustc 1.36.0-nightly (f843ad60e 2019-04-30) 2019-04-29 22:31:39 -07:00
bors
f1eda09ea1 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
2019-04-29 07:03:54 +00:00
bors
0a6f9416ab 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
2019-04-29 05:43:23 +00:00
Manish Goregaokar
79f48d0573 Rustup to rustc 1.36.0-nightly (c7fcbfbf1 2019-04-29)
See https://github.com/rust-lang/rust/pull/60317
2019-04-28 22:42:16 -07:00
bors
9e07b3565d 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
2019-04-28 21:34:09 +00:00
Matthias Krüger
8012b91198 rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel. 2019-04-28 23:28:26 +02:00