]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #4382 - jeremystucki:unnecessary_fold_span, r=flip1995
bors [Thu, 15 Aug 2019 12:57:51 +0000 (12:57 +0000)]
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`

4 years agoAuto merge of #4348 - phansch:deprecate-unused-unused-collect, r=flip1995
bors [Thu, 15 Aug 2019 10:47:20 +0000 (10:47 +0000)]
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

4 years agoAuto merge of #4389 - flip1995:allow_win_failures, r=phansch
bors [Thu, 15 Aug 2019 10:04:56 +0000 (10:04 +0000)]
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

4 years agoAllow failures on the travis windows build again
flip1995 [Thu, 15 Aug 2019 08:41:57 +0000 (10:41 +0200)]
Allow failures on the travis windows build again

4 years agoAuto merge of #4388 - flip1995:rustup, r=phansch
bors [Thu, 15 Aug 2019 09:13:51 +0000 (09:13 +0000)]
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

4 years agoRustup to rust-lang/rust#62984
flip1995 [Thu, 15 Aug 2019 08:13:52 +0000 (10:13 +0200)]
Rustup to rust-lang/rust#62984

Lint redundant_semicolon was added to rustc

4 years agoRustup to rust-lang/rust#62672
flip1995 [Thu, 15 Aug 2019 08:04:47 +0000 (10:04 +0200)]
Rustup to rust-lang/rust#62672

try macro is deprecated now, so Clippy will drop the support for it also

4 years agoRustup to rust-lang/rust#63543
flip1995 [Thu, 15 Aug 2019 07:59:08 +0000 (09:59 +0200)]
Rustup to rust-lang/rust#63543

4 years agoDeprecate unused_collect lint
Philipp Hansch [Wed, 7 Aug 2019 05:37:13 +0000 (07:37 +0200)]
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

4 years agoAuto merge of #4383 - phansch:update_changelog, r=Manishearth
bors [Wed, 14 Aug 2019 19:26:19 +0000 (19:26 +0000)]
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)

4 years agoFix links to lints in changelog
Philipp Hansch [Wed, 14 Aug 2019 18:39:01 +0000 (20:39 +0200)]
Fix links to lints in changelog

4 years agoRemove unused import
Jeremy Stucki [Wed, 14 Aug 2019 18:24:05 +0000 (20:24 +0200)]
Remove unused import

4 years agoUpdate changelog for Rust 1.37
Philipp Hansch [Wed, 14 Aug 2019 18:20:51 +0000 (20:20 +0200)]
Update changelog for Rust 1.37

Also updates the rest of the changelog wrt. to the latest releases.

4 years agoUpdate tests
Jeremy Stucki [Wed, 14 Aug 2019 17:35:17 +0000 (19:35 +0200)]
Update tests

4 years agoUse different span
Jeremy Stucki [Wed, 14 Aug 2019 17:35:06 +0000 (19:35 +0200)]
Use different span

4 years agoAdd multiline test
Jeremy Stucki [Wed, 14 Aug 2019 17:34:50 +0000 (19:34 +0200)]
Add multiline test

4 years agoAuto merge of #4379 - matthiaskrgr:url_dep, r=phansch
bors [Wed, 14 Aug 2019 13:07:19 +0000 (13:07 +0000)]
Auto merge of #4379 - matthiaskrgr:url_dep, r=phansch

update url dependency from 1.7.0 to 2.1.0

changelog: none

4 years agoAuto merge of #4363 - phansch:fix_lint_deprecation, r=flip1995
bors [Wed, 14 Aug 2019 11:37:10 +0000 (11:37 +0000)]
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

4 years agoupdate url dependency from 1.7.0 to 2.1.0
Matthias Krüger [Wed, 14 Aug 2019 11:04:17 +0000 (13:04 +0200)]
update url dependency from 1.7.0 to 2.1.0

4 years agoAuto merge of #4369 - mikerite:fix-4293, r=flip1995
bors [Wed, 14 Aug 2019 10:59:36 +0000 (10:59 +0000)]
Auto merge of #4369 - mikerite:fix-4293, r=flip1995

 Fix `wrong_self_convention` issue

Resolves #4293

changelog: Fix `wrong_self_convention` issue

4 years agoAuto merge of #4231 - jeremystucki:flat-map, r=flip1995
bors [Wed, 14 Aug 2019 09:36:16 +0000 (09:36 +0000)]
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`

4 years agoAuto merge of #4378 - flip1995:ui-toml, r=flip1995
bors [Wed, 14 Aug 2019 08:54:07 +0000 (08:54 +0000)]
Auto merge of #4378 - flip1995:ui-toml, r=flip1995

Update ui-toml tests

changelog: none

4 years agoUpdate ui-toml tests
flip1995 [Wed, 14 Aug 2019 07:58:00 +0000 (09:58 +0200)]
Update ui-toml tests

4 years agoMerge branch 'origin/master' into flat-map
Jeremy Stucki [Wed, 14 Aug 2019 05:36:37 +0000 (07:36 +0200)]
Merge branch 'origin/master' into flat-map

4 years agoUpdate test
Jeremy Stucki [Tue, 13 Aug 2019 19:50:52 +0000 (21:50 +0200)]
Update test

4 years agoUse correct span
Jeremy Stucki [Tue, 13 Aug 2019 19:50:42 +0000 (21:50 +0200)]
Use correct span

4 years agoAdd 'unnecessary_flat_map.fixed'
Jeremy Stucki [Tue, 13 Aug 2019 06:02:59 +0000 (08:02 +0200)]
Add 'unnecessary_flat_map.fixed'

4 years agoRun 'update_lints'
Jeremy Stucki [Mon, 12 Aug 2019 19:47:12 +0000 (21:47 +0200)]
Run 'update_lints'

4 years agoUse 'span_lint_and_sugg'
Jeremy Stucki [Mon, 12 Aug 2019 19:42:57 +0000 (21:42 +0200)]
Use 'span_lint_and_sugg'

4 years agoMinor refactoring
Jeremy Stucki [Mon, 12 Aug 2019 18:35:50 +0000 (20:35 +0200)]
Minor refactoring

4 years agoAdd deprecation tests for deprecated tool lints
Philipp Hansch [Mon, 12 Aug 2019 17:30:06 +0000 (19:30 +0200)]
Add deprecation tests for deprecated tool lints

4 years agoMove old lint deprecation tests to deprecated_old.rs
Philipp Hansch [Mon, 12 Aug 2019 17:26:16 +0000 (19:26 +0200)]
Move old lint deprecation tests to deprecated_old.rs

4 years agoFix invalid_ref deprecation
Philipp Hansch [Mon, 12 Aug 2019 05:27:01 +0000 (07:27 +0200)]
Fix invalid_ref deprecation

4 years agoKeep old deprecated lints deprecated as non-tool, too
Philipp Hansch [Mon, 12 Aug 2019 05:28:07 +0000 (07:28 +0200)]
Keep old deprecated lints deprecated as non-tool, too

4 years agoUpdate lint deprecation for tool lints
Philipp Hansch [Fri, 9 Aug 2019 05:50:25 +0000 (07:50 +0200)]
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.

4 years agoAuto merge of #4373 - flip1995:filter_changelog_none, r=phansch
bors [Mon, 12 Aug 2019 11:05:49 +0000 (11:05 +0000)]
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

4 years agoChange lint type from 'pedantic' → 'complexity'
Jeremy Stucki [Mon, 12 Aug 2019 08:52:09 +0000 (10:52 +0200)]
Change lint type from 'pedantic' → 'complexity'

4 years agoFilter out PRs with changelog: none
flip1995 [Mon, 12 Aug 2019 07:38:52 +0000 (09:38 +0200)]
Filter out PRs with changelog: none

4 years agoRun 'update_lints'
Jeremy Stucki [Mon, 12 Aug 2019 05:53:22 +0000 (07:53 +0200)]
Run 'update_lints'

4 years agoAuto merge of #4365 - lukas-code:async_new_ret_no_self, r=flip1995
bors [Mon, 12 Aug 2019 05:15:16 +0000 (05:15 +0000)]
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.

4 years agoAuto merge of #4367 - flip1995:doc_edition_2018_tests, r=phansch
bors [Mon, 12 Aug 2019 04:38:50 +0000 (04:38 +0000)]
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

4 years agoUpdate rustdoc
Jeremy Stucki [Sun, 11 Aug 2019 20:18:58 +0000 (22:18 +0200)]
Update rustdoc

4 years agoRefactor if_chain
Jeremy Stucki [Sun, 11 Aug 2019 19:02:01 +0000 (21:02 +0200)]
Refactor if_chain

Co-authored-by: Philipp Krones <hello@philkrones.com>
4 years agoAuto merge of #4370 - vallentin:master, r=flip1995
bors [Sun, 11 Aug 2019 18:42:16 +0000 (18:42 +0000)]
Auto merge of #4370 - vallentin:master, r=flip1995

Fixed repeated word

changelog: none

4 years agoRename 'flat_map' → 'flat_map_identity'
Jeremy Stucki [Sun, 11 Aug 2019 18:34:25 +0000 (20:34 +0200)]
Rename 'flat_map' → 'flat_map_identity'

4 years agoHandle calls with 'std::convert::identity'
Jeremy Stucki [Sun, 11 Aug 2019 17:51:43 +0000 (19:51 +0200)]
Handle calls with 'std::convert::identity'

4 years agoMerge branch 'origin/master' into flat-map
Jeremy Stucki [Sun, 11 Aug 2019 17:22:40 +0000 (19:22 +0200)]
Merge branch 'origin/master' into flat-map

4 years agoFixed repeated word
Vallentin [Sun, 11 Aug 2019 10:56:30 +0000 (12:56 +0200)]
Fixed repeated word

4 years agoAuto merge of #4368 - RalfJung:invalid_ref, r=oli-obk
bors [Sun, 11 Aug 2019 09:08:22 +0000 (09:08 +0000)]
Auto merge of #4368 - RalfJung:invalid_ref, r=oli-obk

deprecate invalid_ref lint

This fixes the `invalid_ref` lint test to no longer fail when https://github.com/rust-lang/rust/pull/63346/ lands.  I also fixed the lint itself, because its wording made no sense: there is no "reference to zeroed/uninitialized memory" here.

changelog: none

4 years agoupdate_lints
Ralf Jung [Sun, 11 Aug 2019 09:02:25 +0000 (11:02 +0200)]
update_lints

4 years agodeprecate invalid_ref lint
Ralf Jung [Sun, 11 Aug 2019 07:30:20 +0000 (09:30 +0200)]
deprecate invalid_ref lint

4 years agoFix `wrong_self_convention` issue
Michael Wright [Sat, 10 Aug 2019 04:01:15 +0000 (06:01 +0200)]
Fix `wrong_self_convention` issue

Resolves #4293

4 years agoSimplify `wrong_self_convention` code
Michael Wright [Sat, 10 Aug 2019 04:00:27 +0000 (06:00 +0200)]
Simplify `wrong_self_convention` code

Use actual types instead of hir types.

4 years agoRename implitem to impl_item
Michael Wright [Sat, 10 Aug 2019 03:58:52 +0000 (05:58 +0200)]
Rename implitem to impl_item

`impl_item` is proper snake case and used everywhere else.

4 years agofixed tests (again) and added a test that should actually cause a warning for new_ret...
Lukas Markeffsky [Fri, 9 Aug 2019 21:15:49 +0000 (23:15 +0200)]
fixed tests (again) and added a test that should actually cause a warning for new_ret_no_self

4 years agoremoved unused imports #2
Lukas Markeffsky [Fri, 9 Aug 2019 17:47:25 +0000 (19:47 +0200)]
removed unused imports #2

4 years agoremoved unused imports
Lukas Markeffsky [Fri, 9 Aug 2019 17:44:20 +0000 (19:44 +0200)]
removed unused imports

4 years agoupgrade test to rust 2018
Lukas Markeffsky [Fri, 9 Aug 2019 17:19:49 +0000 (19:19 +0200)]
upgrade test to rust 2018

4 years agoDocument how to write tests requiring the 2018 edition
flip1995 [Fri, 9 Aug 2019 17:14:59 +0000 (19:14 +0200)]
Document how to write tests requiring the 2018 edition

4 years agonew_ret_no_self: walk associated types in impl Trait return types
Lukas Markeffsky [Fri, 9 Aug 2019 15:44:05 +0000 (17:44 +0200)]
new_ret_no_self: walk associated types in impl Trait return types

4 years agoAuto merge of #4362 - lzutao:expect-on-cstring_as_ptr, r=flip1995
bors [Fri, 9 Aug 2019 09:22:02 +0000 (09:22 +0000)]
Auto merge of #4362 - lzutao:expect-on-cstring_as_ptr, r=flip1995

Fix lint_cstring_as_ptr for expect

Closes #4312
changelog: none

4 years agoAuto merge of #4361 - lzutao:fix-raw-string-on-single_char_pattern, r=phansch
bors [Fri, 9 Aug 2019 07:58:39 +0000 (07:58 +0000)]
Auto merge of #4361 - lzutao:fix-raw-string-on-single_char_pattern, r=phansch

Fix lint_single_char_pattern on raw string literal

Closes #4356
changelog: Handle raw string literal on `single_char_literal` lint.

4 years agoAdd more tests for raw string literal
Lzu Tao [Fri, 9 Aug 2019 03:45:49 +0000 (10:45 +0700)]
Add more tests for raw string literal

4 years agoAuto merge of #4360 - atouchet:patch-1, r=phansch
bors [Fri, 9 Aug 2019 06:07:00 +0000 (06:07 +0000)]
Auto merge of #4360 - atouchet:patch-1, r=phansch

Fix HTTPS in links

I accidentally missed these in my previous PR.

changelog: none

4 years agoFix lint_cstring_as_ptr for expect
Lzu Tao [Fri, 9 Aug 2019 05:33:07 +0000 (12:33 +0700)]
Fix lint_cstring_as_ptr for expect

4 years agoFix lint_single_char_pattern on raw string literal
Lzu Tao [Fri, 9 Aug 2019 03:45:49 +0000 (10:45 +0700)]
Fix lint_single_char_pattern on raw string literal

4 years agoFix HTTPS in links
Alex Touchet [Fri, 9 Aug 2019 02:59:22 +0000 (19:59 -0700)]
Fix HTTPS in links

4 years agoAuto merge of #4358 - lzutao:cleanup_implicit_return, r=flip1995
bors [Thu, 8 Aug 2019 16:36:44 +0000 (16:36 +0000)]
Auto merge of #4358 - lzutao:cleanup_implicit_return, r=flip1995

Use source_callsite() instead of recursive outer_expn_info()

changelog: none

4 years agoAuto merge of #4357 - lzutao:update-pr-template, r=flip1995
bors [Thu, 8 Aug 2019 15:56:09 +0000 (15:56 +0000)]
Auto merge of #4357 - lzutao:update-pr-template, r=flip1995

template: Update how to format source code with ./util/dev

changelog: none

4 years agoAuto merge of #4355 - lzutao:macro_expn_try_err, r=flip1995
bors [Thu, 8 Aug 2019 15:16:17 +0000 (15:16 +0000)]
Auto merge of #4355 - lzutao:macro_expn_try_err, r=flip1995

Fix macro expansion in try_err lint

Fixes #4309

changelog: none

4 years agotemplate: Update how to format source code with ./util/dev
Lzu Tao [Thu, 8 Aug 2019 14:37:19 +0000 (21:37 +0700)]
template: Update how to format source code with ./util/dev

4 years agoUse source_callsite() instead of recursive outer_expn_info()
Lzu Tao [Thu, 8 Aug 2019 14:28:40 +0000 (21:28 +0700)]
Use source_callsite() instead of recursive outer_expn_info()

4 years agoUse snippet_with_macro_callsite suggested by flip1995
Lzu Tao [Thu, 8 Aug 2019 12:33:34 +0000 (19:33 +0700)]
Use snippet_with_macro_callsite suggested by flip1995

4 years agoFix macro expansion in try_err lint
Lzu Tao [Thu, 8 Aug 2019 12:33:34 +0000 (19:33 +0700)]
Fix macro expansion in try_err lint

4 years agoAuto merge of #4350 - matthiaskrgr:readme_cargo_fix_clippy, r=phansch
bors [Wed, 7 Aug 2019 20:25:08 +0000 (20:25 +0000)]
Auto merge of #4350 - matthiaskrgr:readme_cargo_fix_clippy, r=phansch

README: mention experimental cargo fix clippy support

mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"

[Rendered](https://github.com/matthiaskrgr/rust-clippy/tree/readme_cargo_fix_clippy#auto-applying-clippy-suggestions)

changelog: none

4 years agoUpdate README.md (fix typo)
Matthias Krüger [Wed, 7 Aug 2019 19:07:35 +0000 (21:07 +0200)]
Update README.md (fix typo)

Co-Authored-By: Philipp Hansch <dev@phansch.net>
4 years agoREADME: mention that cargo fix has experimental support for applying some clippy...
Matthias Krüger [Wed, 7 Aug 2019 14:24:14 +0000 (16:24 +0200)]
README: mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"

4 years agoAuto merge of #4339 - phansch:rustfix_needless_bool, r=flip1995
bors [Wed, 7 Aug 2019 11:00:09 +0000 (11:00 +0000)]
Auto merge of #4339 - phansch:rustfix_needless_bool, r=flip1995

Add run-rustfix for needless_bool lint

This splits up the needless_bool tests into `fixable.rs` and
`simple.rs`. `simple.rs` contains the code that triggers the lint
diagnostic without a suggestion.

changelog: none

cc #3630

4 years agoAuto merge of #4345 - phansch:enum_variants_fix, r=flip1995
bors [Wed, 7 Aug 2019 10:22:06 +0000 (10:22 +0000)]
Auto merge of #4345 - phansch:enum_variants_fix, r=flip1995

Don't emit enum_variant_names if remainder starts with a numeric

changelog: Fix false positive in `pub_enum_variant_names` and `enum_variant_names`

As [per the reference](https://doc.rust-lang.org/reference/identifiers.html), identifiers must start with a letter. So we don't suggest a better
variant naming in case the remainder would start with a numeric.

Fixes #739

4 years agoAuto merge of #4346 - atouchet:links, r=flip1995
bors [Wed, 7 Aug 2019 08:31:47 +0000 (08:31 +0000)]
Auto merge of #4346 - atouchet:links, r=flip1995

Update Readme

<!--
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

4 years agoAuto merge of #4340 - lzutao:rustup, r=oli-obk
bors [Wed, 7 Aug 2019 07:05:53 +0000 (07:05 +0000)]
Auto merge of #4340 - lzutao:rustup, r=oli-obk

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

Unblock https://github.com/rust-lang/rust/pull/63280

changelog: none

4 years agoUpdate Readme
Alex Touchet [Tue, 6 Aug 2019 20:09:26 +0000 (13:09 -0700)]
Update Readme

4 years agoDon't emit enum_variant_names if remainder starts with a numeric
Philipp Hansch [Tue, 6 Aug 2019 18:45:36 +0000 (20:45 +0200)]
Don't emit enum_variant_names if remainder starts with a numeric

As [per the reference](https://doc.rust-lang.org/reference/identifiers.html),
identifiers must start with a letter. So we don't suggest a better
variant naming in these cases.

Fixes #739

4 years agoRustup https://github.com/rust-lang/rust/pull/59369
Lzu Tao [Tue, 6 Aug 2019 12:20:41 +0000 (19:20 +0700)]
Rustup https://github.com/rust-lang/rust/pull/59369

4 years agoAdd run-rustfix for needless_bool lint
Philipp Hansch [Mon, 5 Aug 2019 20:05:05 +0000 (22:05 +0200)]
Add run-rustfix for needless_bool lint

This splits up the needless_bool tests into `fixable.rs` and
`simple.rs`. `simple.rs` contains the code that triggers the lint
diagnostic without a suggestion.

4 years agoAuto merge of #4335 - phansch:fix_needless_bool_suggestion, r=flip1995
bors [Mon, 5 Aug 2019 18:54:11 +0000 (18:54 +0000)]
Auto merge of #4335 - phansch:fix_needless_bool_suggestion, r=flip1995

Fix needless_bool suggestion with if--else-if--else

changelog: Fix `needless_bool` suggestion with if--else-if--else

Closes #4334

4 years agofmt
Philipp Hansch [Mon, 5 Aug 2019 18:53:13 +0000 (20:53 +0200)]
fmt

4 years agoFix needless_bool suggestion with if-else-if-else
Philipp Hansch [Sun, 4 Aug 2019 20:08:28 +0000 (22:08 +0200)]
Fix needless_bool suggestion with if-else-if-else

Closes #4334

4 years agoAuto merge of #4203 - Urriel:feat/333_calling_main, r=flip1995
bors [Mon, 5 Aug 2019 15:54:44 +0000 (15:54 +0000)]
Auto merge of #4203 - Urriel:feat/333_calling_main, r=flip1995

Add recursion check on main function

Changes:
- Add MainRecursion lint to Clippy
- Check for no-std setup

fixes #333

changelog: Add `main_recursion` lint

4 years agoIgnore no_std-test on windows and macos
flip1995 [Mon, 5 Aug 2019 15:53:55 +0000 (17:53 +0200)]
Ignore no_std-test on windows and macos

4 years agoRun update_lints and fmt
flip1995 [Mon, 5 Aug 2019 11:24:31 +0000 (13:24 +0200)]
Run update_lints and fmt

4 years agoMove expression check to LateLintPass
Vincent Dal Maso [Mon, 17 Jun 2019 15:36:42 +0000 (17:36 +0200)]
Move expression check to LateLintPass

Changes:
- Move from EarlyLintPass
- Fix entrypoint check with function path def_id.

4 years agoAdd recursion check on main function
Vincent Dal Maso [Thu, 13 Jun 2019 08:58:35 +0000 (10:58 +0200)]
Add recursion check on main function

Changes:
- Add MainRecursion lint to clippy
- Check for no-std setup

fixes #333

4 years agoAuto merge of #4338 - flip1995:rollup-9cm4jbr, r=flip1995
bors [Mon, 5 Aug 2019 09:44:45 +0000 (09:44 +0000)]
Auto merge of #4338 - flip1995:rollup-9cm4jbr, r=flip1995

Rollup of 4 pull requests

Successful merges:

 - #4329 (Doctests: Enable running doc tests for pedantic lints)
 - #4330 (Doctests: Enable running doc tests for nursery lints)
 - #4331 (Doctests: Enable running doc tests for restriction lints)
 - #4332 (Split up cast.rs tests, run-rustfix for unnecessary_cast)

Failed merges:

r? @ghost

changelog: none

4 years agoRollup merge of #4332 - phansch:rustfix_unnecessary_cast, r=flip1995
Philipp Krones [Mon, 5 Aug 2019 08:50:07 +0000 (10:50 +0200)]
Rollup merge of #4332 - phansch:rustfix_unnecessary_cast, r=flip1995

Split up cast.rs tests, run-rustfix for unnecessary_cast

This splits up the cast.rs tests and enables rustfix tests for the part
of the `unnecessary_cast` lint that emits `MachineApplicable`
suggestions.

changelog: none

cc #3630

4 years agoRollup merge of #4331 - phansch:doctests_restriction, r=flip1995
Philipp Krones [Mon, 5 Aug 2019 08:50:06 +0000 (10:50 +0200)]
Rollup merge of #4331 - phansch:doctests_restriction, r=flip1995

Doctests: Enable running doc tests for restriction lints

changelog: Enabled remaining doc tests for lint documentation page

master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 231 passed; 0 failed; 123 ignored; 0 measured; 0 filtered out

Closes #4319 (assuming this is merged after #4329 and #4330)

4 years agoRollup merge of #4330 - phansch:doctests_nursery, r=flip1995
Philipp Krones [Mon, 5 Aug 2019 08:50:04 +0000 (10:50 +0200)]
Rollup merge of #4330 - phansch:doctests_nursery, r=flip1995

Doctests: Enable running doc tests for nursery lints

changelog: none

master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 213 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out

cc #4319

4 years agoRollup merge of #4329 - phansch:doctests_pedantic, r=flip1995
Philipp Krones [Mon, 5 Aug 2019 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #4329 - phansch:doctests_pedantic, r=flip1995

Doctests: Enable running doc tests for pedantic lints

changelog: none

master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 254 passed; 0 failed; 131 ignored; 0 measured; 0 filtered out

cc #4319

4 years agoAuto merge of #4337 - flip1995:let_unit, r=phansch
bors [Mon, 5 Aug 2019 08:41:24 +0000 (08:41 +0000)]
Auto merge of #4337 - flip1995:let_unit, r=phansch

 Make let_unit lint suggestion auto applicable

changelog: Make `let_unit` lint suggestion auto applicable

4 years agoAuto merge of #4333 - phansch:rustfix_decimal_literal_representation, r=flip1995
bors [Mon, 5 Aug 2019 08:00:39 +0000 (08:00 +0000)]
Auto merge of #4333 - phansch:rustfix_decimal_literal_representation, r=flip1995

Add run-rustfix for decimal_literal_representation lint

changelog: none

cc #3630