Commit graph

6653 commits

Author SHA1 Message Date
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
bors
dbe2bb4256 Auto merge of #4379 - matthiaskrgr:url_dep, r=phansch
update url dependency from 1.7.0 to 2.1.0

changelog: none
2019-08-14 13:07:19 +00:00
bors
06430e7af4 Auto merge of #4363 - phansch:fix_lint_deprecation, r=flip1995
Update lint deprecation for tool lints

changelog: Allow tool lints (`clippy::*`) to be deprecated

Our lint deprecation previously didn't work for tool lints, because
`register_removed` was registering lints to be removed _without_ the
`clippy` prefix.

Fixes #4349
2019-08-14 11:37:10 +00:00
Matthias Krüger
37d79d9a29 update url dependency from 1.7.0 to 2.1.0 2019-08-14 13:04:17 +02:00
bors
63d2d066f9 Auto merge of #4369 - mikerite:fix-4293, r=flip1995
Fix `wrong_self_convention` issue

Resolves #4293

changelog: Fix `wrong_self_convention` issue
2019-08-14 10:59:36 +00:00
bors
4f8bdf3587 Auto merge of #4231 - jeremystucki:flat-map, r=flip1995
Implement flat_map lint

Fixes #4224

changelog: New Lint `flat_map_identity` to detect unnecessary calls to `flat_map`
2019-08-14 09:36:16 +00:00
bors
36f7faee05 Auto merge of #4378 - flip1995:ui-toml, r=flip1995
Update ui-toml tests

changelog: none
2019-08-14 08:54:07 +00:00
flip1995
17808c7d00
Update ui-toml tests 2019-08-14 09:58:00 +02:00
Jeremy Stucki
2bfcf89f82
Merge branch 'origin/master' into flat-map 2019-08-14 07:36:37 +02:00
Jeremy Stucki
2fe5e2cea9
Update test 2019-08-13 21:50:52 +02:00
Jeremy Stucki
d578c43c51
Use correct span 2019-08-13 21:50:42 +02:00
Jeremy Stucki
6a263c0816
Add 'unnecessary_flat_map.fixed' 2019-08-13 08:03:04 +02:00
Jeremy Stucki
4275d7b6ac
Run 'update_lints' 2019-08-12 21:47:12 +02:00
Jeremy Stucki
d51136d594
Use 'span_lint_and_sugg' 2019-08-12 21:42:57 +02:00
Jeremy Stucki
3a65e4e75a
Minor refactoring 2019-08-12 21:29:33 +02:00
Philipp Hansch
e406ab5117
Add deprecation tests for deprecated tool lints 2019-08-12 19:42:23 +02:00
Philipp Hansch
0d0db5ed5f
Move old lint deprecation tests to deprecated_old.rs 2019-08-12 19:42:23 +02:00
Philipp Hansch
b50c13c578
Fix invalid_ref deprecation 2019-08-12 19:42:23 +02:00
Philipp Hansch
0b7e2376c8
Keep old deprecated lints deprecated as non-tool, too 2019-08-12 19:42:23 +02:00
Philipp Hansch
5114050839
Update lint deprecation for tool lints
Our lint deprecation previously didn't work for tool lints, because
`register_removed` was registering lints to be removed _without_ the
`clippy` prefix.
2019-08-12 19:20:36 +02:00
Philipp Hansch
38c1971b43
Further text improvements 2019-08-12 19:19:46 +02:00
bors
c154754b74 Auto merge of #4373 - flip1995:filter_changelog_none, r=phansch
Filter out PRs with changelog: none

cc #4372

Filtering out the `changelog: none` merge commits, to unclutter the output.

changelog: none
2019-08-12 11:05:49 +00:00
Jeremy Stucki
09e9568c26
Change lint type from 'pedantic' → 'complexity' 2019-08-12 10:53:23 +02:00
flip1995
27ddde561e
Filter out PRs with changelog: none 2019-08-12 09:38:52 +02:00
Jeremy Stucki
6ddf8c36d7
Run 'update_lints' 2019-08-12 07:53:22 +02:00
bors
e255f36afe Auto merge of #4365 - lukas-code:async_new_ret_no_self, r=flip1995
new_ret_no_self: allow Self in inner type for impl Trait return types

Check the inner types of associated types of a trait when checking for Self in the return type of a `new` method. This means that the following will no longer warn:
```rust
trait Trait {
    type Inner;
}

struct S;

impl S {
    fn new() -> impl Trait<Inner = Option<Self>> {
        struct TraitImpl;

        impl Trait for TraitImpl {
            type Inner = Option<S>;
        }

        TraitImpl
    }
}
```
```rust
#![feature(async_await)]

struct Connection;

impl Connection {
    async fn new() -> Result<Self, ()> {
        Ok(S)
    }
}
```
closes #4359

changelog: fix `new_ret_no_self` lint for async `new` functions.
2019-08-12 05:15:16 +00:00
Philipp Hansch
c90eb4f4b3
Add image 2019-08-12 06:56:54 +02:00
bors
ed1de3d377 Auto merge of #4367 - flip1995:doc_edition_2018_tests, r=phansch
Document how to write tests requiring the 2018 edition

[Rendered](https://github.com/flip1995/rust-clippy/blob/doc_edition_2018_tests/doc/adding_lints.md#Edition-2018-tests)

cc #4365

changelog: none
2019-08-12 04:38:50 +00:00
Jeremy Stucki
df9063013e
Update rustdoc 2019-08-11 22:18:58 +02:00
Jeremy Stucki
5fd7d44f36
Refactor if_chain
Co-authored-by: Philipp Krones <hello@philkrones.com>
2019-08-11 21:02:01 +02:00
bors
7a0ac4c25d Auto merge of #4370 - vallentin:master, r=flip1995
Fixed repeated word

changelog: none
2019-08-11 18:42:16 +00:00