Commit graph

6683 commits

Author SHA1 Message Date
Lzu Tao
41eba2f26a Add test 2019-08-19 05:41:47 +00:00
Matthias Krüger
88f417e446 try to fix build in rustc repo 2019-08-19 06:10:00 +02:00
Lzu Tao
50ecd595a6 Allow option_and_then_some in option_map_or_none test 2019-08-19 03:54:40 +00:00
Lzu Tao
7065239da5 Add option_and_then_some lint 2019-08-19 03:54:40 +00:00
Jamie McClymont
4ee9d02efa Requested changes 2019-08-19 14:20:38 +12:00
bors
f01a0c0e08 Auto merge of #4403 - xd009642:type_repetition_improvements, r=phansch,flip1995
Improvements to `type_repetition_in_bounds`

Improvements to the `type_repetition_in_bounds` trait based on feedback from #4380 #4326 #4323

Currently just make it pedantic. Hopefully, more to come

changelog: move `type_repetition_in_bounds` to `pedantic`
2019-08-18 21:03:21 +00:00
bors
6668e629ba Auto merge of #4404 - BO41:patch-1, r=flip1995
Add "could be written as" example to MANUAL_MEMCPY

<!--
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 `./util/dev fmt`

[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints

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-08-18 20:34:25 +00:00
Jeremy Stucki
df211ff467
Ignore lines starting with '#' 2019-08-18 18:04:18 +02:00
xd009642
76598adafb Run update_lints 2019-08-18 16:59:31 +01:00
bors
b233685596 Auto merge of #4394 - jeremystucki:suspicious_map, r=flip1995
Implement "suspicious_map" lint

Resolves #4010

changelog: New lint `suspicious_map`.
2019-08-18 15:53:53 +00:00
Jamie McClymont
802a6d33da run-rustfix for unseparated-prefix-literals 2019-08-19 02:58:58 +12:00
Jeremy Stucki
9c39c02b75
Change lint type to 'complexity' 2019-08-18 16:49:11 +02:00
Jamie McClymont
c8fb62148e Add autofixable suggestion for unseparated integer literal suffices 2019-08-19 02:46:12 +12:00
Jeremy Stucki
5df84f2192
Merge branch 'origin/master' into suspicious_map 2019-08-18 16:37:31 +02:00
bors
e92c48989f Auto merge of #4407 - mikerite:fix-breakage-20190818, r=flip1995
Fix breakage due to  rust-lang/rust#61708

Includes commits from #4406

changelog: none
2019-08-18 12:52:35 +00:00
Michael Wright
b313d25350 Fix breakage due to rust-lang/rust#61708 2019-08-18 13:14:47 +02:00
Lzu Tao
533bdfbdbc Fix assertions_on_constants lint 2019-08-18 02:34:30 +07:00
Lzu Tao
439284b584 Make code cleaner and more readable 2019-08-18 01:47:45 +07:00
BO41
b17cb32bcb
Add "could be written as" example to MANUAL_MEMCPY 2019-08-17 13:09:03 +00:00
xd009642
c1e57402d3 Made lint pedantic 2019-08-17 11:45:05 +01:00
bors
49dff2c9f3 Auto merge of #4397 - kraai:remove-a, r=flip1995
Remove "a" from single_match_else description

changelog: none
2019-08-16 20:04:39 +00:00
bors
b83dece263 Auto merge of #4392 - phansch:cleanups, r=flip1995
Remove unused dev scripts/files

781794d4: Remove util/update_lints.py

 * This has been deprecated for ~10 months, so I think it's fine to remove now.

90a42937: Remove publishing things

 * Clippy is no longer published via crates.io, so these docs and the script
   are not needed anymore.

changelog: none
2019-08-16 19:34:11 +00:00
bors
70f12dce02 Auto merge of #4398 - kraai:outer_expn_data, r=flip1995
Use outer_expn_data instead of outer_expn_info

`outer_expn_info` has been removed, so use its replacement, `outer_expn_data`, instead.

changelog: none
2019-08-16 17:09:28 +00:00
flip1995
2456b355f2
Run rustfmt 2019-08-16 19:05:44 +02:00
KRAAI, MATTHEW [VISUS]
f74d9db7f4 Use outer_expn_data instead of outer_expn_info 2019-08-16 09:31:12 -07:00
KRAAI, MATTHEW [VISUS]
a68abc03a2 Remove "a" from single_match_else description 2019-08-16 05:41:35 -07:00
bors
348d398b1c Auto merge of #4395 - lzutao:rustup-63586, r=phansch
Rustup "Remove `Spanned` from `{ast,hir}::FieldPat`"

Rustup https://github.com/rust-lang/rust/pull/63586

changelog: none
2019-08-16 04:49:53 +00:00
Lzu Tao
65b906a8fc Rustup "Remove Spanned from {ast,hir}::FieldPat" 2019-08-16 09:32:27 +07:00
Jeremy Stucki
72e4e4ac6c
Add ui test 2019-08-15 22:58:32 +02:00
Jeremy Stucki
f4f31a4ff4
Implement lint 'suspicious_map' 2019-08-15 22:58:32 +02:00
Philipp Hansch
781794d49f
Remove util/update_lints.py
This has been deprecated for ~10 months, so I think it's fine to remove now.
2019-08-15 17:43:30 +02:00
Philipp Hansch
90a4293759
Remove publishing things
Clippy is no longer published via crates.io, so these docs and the
script are not needed anymore.
2019-08-15 17:42:05 +02:00
bors
f95c87ecea Auto merge of #4391 - flip1995:toml_ver, r=phansch
Also specify patch version of toml crate

cc rust-lang/rust#63587

The patch update of the toml crate to version 0.5.3 recently broke some tests: #4378. For rustc, we have to define the complete version though.

changelog: none
2019-08-15 14:09:48 +00:00
flip1995
ebd3eeaede
Also specify patch version of toml crate 2019-08-15 15:58:36 +02:00
bors
607b8299c5 Auto merge of #4382 - jeremystucki:unnecessary_fold_span, r=flip1995
Change span of unnecessary_fold lint

Resolves #4381

changelog: Change linted span of `unnecessary_fold`
2019-08-15 12:57:51 +00:00
bors
a3da66d6d3 Auto merge of #4348 - phansch:deprecate-unused-unused-collect, r=flip1995
Deprecate unused_collect lint

I found this because we only had two test cases in total for this lint.
It turns out the functionality is fully covered by rustc these days.

[Playground Examples](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eb8ee6db389c77180c9fb152d3c608f4)

changelog: Deprecate `unused_collect` lint. This is fully covered by rustc's `#[must_use]` on `collect`

cc #2846
2019-08-15 10:47:20 +00:00
bors
33ec66a96f Auto merge of #4389 - flip1995:allow_win_failures, r=phansch
Allow windows failures on travis

The windows build breaks about every second travis run. Let's disable it, until we got a fix.

changelog: none
2019-08-15 10:04:56 +00:00
flip1995
911c3de909
Allow failures on the travis windows build again 2019-08-15 11:33:28 +02:00
bors
34457fbd8b Auto merge of #4388 - flip1995:rustup, r=phansch
Rustup

Supersedes #4387 and #4385

This removes tests with the `try!` macro in them completely. There is no need for Clippy to support the `try!` macro, since it is deprecated now.

[`StmtKind`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/enum.StmtKind.html) got a new variant [`Semi`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/enum.StmtKind.html#variant.Semi), which Just Works with the `author` lint. Nice.

changelog: none
2019-08-15 09:13:51 +00:00
flip1995
87fa2d90f5
Rustup to rust-lang/rust#62984
Lint redundant_semicolon was added to rustc
2019-08-15 10:14:06 +02:00
flip1995
e1d573c242
Rustup to rust-lang/rust#62672
try macro is deprecated now, so Clippy will drop the support for it also
2019-08-15 10:14:06 +02:00
flip1995
9533fa5b19
Rustup to rust-lang/rust#63543 2019-08-15 10:14:06 +02:00
Philipp Hansch
42f03539ca
Deprecate unused_collect lint
I found this because we only had two test cases in total for this lint.
It turns out the functionality is fully covered by rustc these days.

[Playground Examples](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eb8ee6db389c77180c9fb152d3c608f4)

changelog: Deprecate `unused_collect` lint. This is fully covered by
rustc's `#[must_use]` on `collect`

cc #2846
2019-08-14 21:47:11 +02:00
bors
d829d9f6b0 Auto merge of #4383 - phansch:update_changelog, r=Manishearth
Update changelog for Rust 1.37

Also updates the rest of the changelog wrt. to the latest releases and commit hashes.

changelog: none

[Rendered](https://github.com/phansch/rust-clippy/blob/update_changelog/CHANGELOG.md#rust-137)
2019-08-14 19:26:19 +00:00
Philipp Hansch
171f307b65
Fix links to lints in changelog 2019-08-14 20:39:01 +02:00
Jeremy Stucki
fdf82eb1a8
Remove unused import 2019-08-14 20:24:05 +02:00
Philipp Hansch
22c649a8a6
Update changelog for Rust 1.37
Also updates the rest of the changelog wrt. to the latest releases.
2019-08-14 20:20:51 +02:00
Jeremy Stucki
4366137d2e
Update tests 2019-08-14 19:35:17 +02:00
Jeremy Stucki
08f658bc72
Use different span 2019-08-14 19:35:06 +02:00
Jeremy Stucki
214d499103
Add multiline test 2019-08-14 19:34:50 +02:00