]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge branch 'master' into fix-2728
Michael Wright [Fri, 1 Feb 2019 04:27:36 +0000 (06:27 +0200)]
Merge branch 'master' into fix-2728

5 years agoAuto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr
bors [Thu, 31 Jan 2019 10:01:13 +0000 (10:01 +0000)]
Auto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr

Rustup: unused trim result

Caused by https://github.com/rust-lang/rust/pull/57106

r? @matthiaskrgr

5 years agoRustup: unused trim result
Philipp Hansch [Thu, 31 Jan 2019 07:27:04 +0000 (08:27 +0100)]
Rustup: unused trim result

5 years agoFix `cast_sign_loss` false positive
Michael Wright [Thu, 31 Jan 2019 04:20:49 +0000 (06:20 +0200)]
Fix `cast_sign_loss` false positive

This checks if the value is a non-negative constant before linting about
losing the sign.

Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.

Fixes #2728

5 years agoAuto merge of #3652 - Aehmlo:where_the_wild_things_are, r=phansch
bors [Tue, 29 Jan 2019 22:48:03 +0000 (22:48 +0000)]
Auto merge of #3652 - Aehmlo:where_the_wild_things_are, r=phansch

Add wildcard_match_arm lint

This lint prevents using a wildcard in a match arm. Implemented as a restriction currently, because this is pretty much an edge case. See #3649 for more information.

Didn't add any tests because I wasn't sure how, but if someone wants to point me in the right direction, I'd be happy to!

5 years agowildcard_match_arm: Update lint count.
Alex Hamilton [Tue, 29 Jan 2019 21:33:16 +0000 (15:33 -0600)]
wildcard_match_arm: Update lint count.

5 years agowildcard_match_arm: add nesting issue to known.
Alex Hamilton [Tue, 29 Jan 2019 20:34:04 +0000 (14:34 -0600)]
wildcard_match_arm: add nesting issue to known.

5 years agowildcard_match_arm: lint only enum matches.
Alex Hamilton [Tue, 29 Jan 2019 20:25:40 +0000 (14:25 -0600)]
wildcard_match_arm: lint only enum matches.

5 years agowildcard_match_arm: update ui test stderr
Alex Hamilton [Tue, 29 Jan 2019 18:39:01 +0000 (12:39 -0600)]
wildcard_match_arm: update ui test stderr

5 years agowildcard_match_arm: format test.
Alex Hamilton [Tue, 29 Jan 2019 18:23:11 +0000 (12:23 -0600)]
wildcard_match_arm: format test.

5 years agowilcard_match_arm: run rustfmt.
Alex Hamilton [Sun, 27 Jan 2019 21:41:22 +0000 (15:41 -0600)]
wilcard_match_arm: run rustfmt.

5 years agowildcard_match_arm: add lint properly.
Alex Hamilton [Fri, 25 Jan 2019 17:06:19 +0000 (11:06 -0600)]
wildcard_match_arm: add lint properly.

5 years agowildcard_match_arm: rename function.
Alex Hamilton [Fri, 25 Jan 2019 16:56:00 +0000 (10:56 -0600)]
wildcard_match_arm: rename function.

We also don't need `ex` as an argument.

5 years agowildcard_match_arm: add simple ui test.
Alex Hamilton [Fri, 25 Jan 2019 16:42:11 +0000 (10:42 -0600)]
wildcard_match_arm: add simple ui test.

5 years agowildcard_match_arm: expand lint scope.
Alex Hamilton [Fri, 25 Jan 2019 16:39:09 +0000 (10:39 -0600)]
wildcard_match_arm: expand lint scope.

We're not only working with Results.

5 years agoChange match_wild lint name to WILDCARD_MATCH_ARM.
Alex Hamilton [Sat, 12 Jan 2019 23:45:16 +0000 (17:45 -0600)]
Change match_wild lint name to WILDCARD_MATCH_ARM.

Also fix message capitalization.

5 years agoAdd match_wild lint (#3649).
Alex Hamilton [Thu, 10 Jan 2019 20:56:28 +0000 (14:56 -0600)]
Add match_wild lint (#3649).

This lint prevents using a wildcard in a match.

5 years agoAuto merge of #3648 - phansch:const_fn_lint, r=oli-obk
bors [Tue, 29 Jan 2019 19:58:13 +0000 (19:58 +0000)]
Auto merge of #3648 - phansch:const_fn_lint, r=oli-obk

Add initial version of const_fn lint

This adds an initial version of a lint that can tell if a function could be `const`.

TODO:

- [x] Finish up the docs
- [x] Fix the ICE

cc #2440

5 years agoAuto merge of #3716 - matthiaskrgr:sh, r=phansch
bors [Tue, 29 Jan 2019 19:06:33 +0000 (19:06 +0000)]
Auto merge of #3716 - matthiaskrgr:sh, r=phansch

fetch_prs_between: add .sh file ending

r? @phansch

5 years agofetch_prs_between: add .sh file ending
Matthias Krüger [Tue, 29 Jan 2019 19:00:45 +0000 (20:00 +0100)]
fetch_prs_between: add .sh file ending

5 years agocargo fmt
Philipp Hansch [Wed, 23 Jan 2019 06:32:58 +0000 (07:32 +0100)]
cargo fmt

5 years agoAuto merge of #3714 - mikerite:fix-2945, r=oli-obk
bors [Tue, 29 Jan 2019 11:57:26 +0000 (11:57 +0000)]
Auto merge of #3714 - mikerite:fix-2945, r=oli-obk

Fix `unit_arg` false positive

Ignore arguments with the question mark operator.

Closes #2945

5 years agoUpdate various docs
Philipp Hansch [Tue, 22 Jan 2019 06:59:09 +0000 (07:59 +0100)]
Update various docs

* `const_transmute` currently also seems to depend on the `const_fn`
  feature.
* Only `Sized` is currently allowed as a bound, not Copy.

5 years agoUse built-in entry_fn detection over self-built
Philipp Hansch [Tue, 22 Jan 2019 06:36:15 +0000 (07:36 +0100)]
Use built-in entry_fn detection over self-built

5 years agocargo fmt
Philipp Hansch [Mon, 21 Jan 2019 06:54:05 +0000 (07:54 +0100)]
cargo fmt

5 years agoReorganize conditionals: Run faster checks first
Philipp Hansch [Mon, 14 Jan 2019 15:44:10 +0000 (16:44 +0100)]
Reorganize conditionals: Run faster checks first

5 years agoMaybe fix ICE?
Philipp Hansch [Thu, 10 Jan 2019 19:33:24 +0000 (20:33 +0100)]
Maybe fix ICE?

5 years agoAdd initial version of const_fn lint
Philipp Hansch [Wed, 9 Jan 2019 19:11:37 +0000 (20:11 +0100)]
Add initial version of const_fn lint

5 years agoFix `unit_arg` false positive
Michael Wright [Tue, 29 Jan 2019 05:22:08 +0000 (07:22 +0200)]
Fix `unit_arg` false positive

Ignore arguments with the question mark operator.

Closes #2945

5 years agoAuto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk
bors [Mon, 28 Jan 2019 14:30:18 +0000 (14:30 +0000)]
Auto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk

Prevent incorrect cast_lossless suggestion in const_fn

`::from` is not a const fn, so applying the suggestion of
`cast_lossless` would fail to compile. The fix is to skip the lint if
the cast is found inside a const fn.

Fixes #3656

5 years agoAuto merge of #3711 - rust-lang:rustup, r=oli-obk
bors [Mon, 28 Jan 2019 11:37:45 +0000 (11:37 +0000)]
Auto merge of #3711 - rust-lang:rustup, r=oli-obk

Rustup

fixes #3709

I'm currently in the process of making rustc's deprecation lint emit the `AtomicFoo::new(0)` suggestion

5 years agoRustfmt
Oliver Scherer [Mon, 28 Jan 2019 10:32:41 +0000 (11:32 +0100)]
Rustfmt

5 years agoCheck hypothetically failing conversion
Oliver Scherer [Mon, 28 Jan 2019 09:32:34 +0000 (10:32 +0100)]
Check hypothetically failing conversion

5 years agoRemove tests for deprecated items
Oliver Scherer [Mon, 28 Jan 2019 09:17:04 +0000 (10:17 +0100)]
Remove tests for deprecated items

5 years agoUpdate more changed iterator paths
Oliver Scherer [Mon, 28 Jan 2019 09:16:34 +0000 (10:16 +0100)]
Update more changed iterator paths

5 years agoAtomics constants are now handled by the deprecation lint
Oliver Scherer [Mon, 28 Jan 2019 09:10:27 +0000 (10:10 +0100)]
Atomics constants are now handled by the deprecation lint

5 years agoUpdate changed iterator paths
Oliver Scherer [Mon, 28 Jan 2019 09:09:45 +0000 (10:09 +0100)]
Update changed iterator paths

5 years agoUpdate const slice processing
Oliver Scherer [Mon, 28 Jan 2019 09:09:34 +0000 (10:09 +0100)]
Update const slice processing

5 years agoAuto merge of #3706 - robamler:patch-1, r=phansch
bors [Sun, 27 Jan 2019 13:34:47 +0000 (13:34 +0000)]
Auto merge of #3706 - robamler:patch-1, r=phansch

Fix documentation for `slow_vector_initialization`

This PR fixes the documentation for the lint `slow_vector_initialization`. The documentation recommended writing `vec![len; 0]` but the correct solution is `vec![0; len]`.

5 years agoAuto merge of #3705 - matthiaskrgr:rustup, r=phansch
bors [Sun, 27 Jan 2019 13:14:37 +0000 (13:14 +0000)]
Auto merge of #3705 - matthiaskrgr:rustup, r=phansch

rustup

rustup https://github.com/rust-lang/rust/pull/57907/ and https://github.com/rust-lang/rust/pull/57726
Fixes #3708

5 years agoupdate test stderr
Matthias Krüger [Sun, 27 Jan 2019 12:46:22 +0000 (13:46 +0100)]
update test stderr

5 years agorun cargo fmt
Matthias Krüger [Sun, 27 Jan 2019 12:34:23 +0000 (13:34 +0100)]
run cargo fmt

5 years agorustup https://github.com/rust-lang/rust/pull/57907/
Matthias Krüger [Sun, 27 Jan 2019 12:33:56 +0000 (13:33 +0100)]
rustup https://github.com/rust-lang/rust/pull/57907/

for file in `fd \.rs$` ; do sed  -i  s/span_suggestion_with_applicability/span_suggestion/g $file ; done

for file in `fd \.rs$` ; do sed  -i  s/span_suggestion_short_with_applicability/span_suggestion_short/g $file ; done

for file in `fd \.rs$` ; do sed  -i  s/span_suggestions_with_applicability/span_suggestions/g $file ; done

5 years agoFix documentation for `slow_vector_initialization`
Robert Bamler [Sun, 27 Jan 2019 04:26:38 +0000 (20:26 -0800)]
Fix documentation for `slow_vector_initialization`

Change the recommended solution from `vec![len; 0]` to `vec![0; len]`.

Also fix grammar.

5 years agorustup https://github.com/rust-lang/rust/pull/57726
Matthias Krüger [Sat, 26 Jan 2019 19:40:55 +0000 (20:40 +0100)]
rustup https://github.com/rust-lang/rust/pull/57726

5 years agoAuto merge of #3702 - phansch:changechangelog, r=matthiaskrgr
bors [Sat, 26 Jan 2019 11:58:35 +0000 (11:58 +0000)]
Auto merge of #3702 - phansch:changechangelog, r=matthiaskrgr

Remove unsafe_vector_initialization from added lints

It was deprecated before it reached a stable release,
no need to include it.

5 years agoRemove unsafe_vector_initialization from added lints
Philipp Hansch [Sat, 26 Jan 2019 11:50:40 +0000 (12:50 +0100)]
Remove unsafe_vector_initialization from added lints

It was deprecated before it reached a stable release,
no need to include it.

5 years agoAuto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch
bors [Sat, 26 Jan 2019 10:57:39 +0000 (10:57 +0000)]
Auto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch

Fix `expect_fun_call` lint suggestions

This commit corrects some bad suggestions produced by the
`expect_fun_call` lint and enables `rust-fix` checking on the tests.

Addresses #3630

5 years agoPrevent incorrect cast_lossless suggestion in const_fn
Philipp Hansch [Sat, 26 Jan 2019 08:49:55 +0000 (09:49 +0100)]
Prevent incorrect cast_lossless suggestion in const_fn

`::from` is not a const fn, so applying the suggestion of
`cast_lossless` would fail to compile. The fix is to skip the lint if
the cast is found inside a const fn.

5 years agoAuto merge of #3701 - mikerite:fix-3118, r=phansch
bors [Sat, 26 Jan 2019 09:56:07 +0000 (09:56 +0000)]
Auto merge of #3701 - mikerite:fix-3118, r=phansch

Fix dogfood tests on Appveyor

This introduces a work-around for a bug in rustup.rs when excuting
cargo from a custom toolchain. Instead of trusting rustup to
invoke cargo from one of the release channels we just invoke
nightly cargo directly.

5 years agoIncorporate review suggestions
Michael Wright [Sat, 26 Jan 2019 09:55:54 +0000 (11:55 +0200)]
Incorporate review suggestions

5 years agoFix dogfood tests on Appveyor
Michael Wright [Sat, 26 Jan 2019 09:10:13 +0000 (11:10 +0200)]
Fix dogfood tests on Appveyor

This introduces a work-around for a bug in rustup.rs when excuting
cargo from a custom toolchain. Instead of trusting rustup to
invoke cargo from one of the release channels we just invoke
nightly cargo directly.

5 years agoAuto merge of #3698 - sorin-davidoi:fix-common-metadata-no-deps, r=oli-obk
bors [Fri, 25 Jan 2019 23:01:06 +0000 (23:01 +0000)]
Auto merge of #3698 - sorin-davidoi:fix-common-metadata-no-deps, r=oli-obk

chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1

Closes https://github.com/rust-lang/rust-clippy/issues/3692.

5 years agotest(versioncheck): Use .no_deps()
Sorin Davidoi [Fri, 25 Jan 2019 20:28:09 +0000 (21:28 +0100)]
test(versioncheck): Use .no_deps()

5 years agotest(versioncheck): Fix version equality check
Sorin Davidoi [Fri, 25 Jan 2019 19:39:45 +0000 (20:39 +0100)]
test(versioncheck): Fix version equality check

5 years agochore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1
Sorin Davidoi [Fri, 25 Jan 2019 19:27:07 +0000 (20:27 +0100)]
chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1

Closes https://github.com/rust-lang/rust-clippy/issues/3692.

5 years agoAuto merge of #3699 - matthiaskrgr:itertools, r=oli-obk
bors [Fri, 25 Jan 2019 20:00:20 +0000 (20:00 +0000)]
Auto merge of #3699 - matthiaskrgr:itertools, r=oli-obk

dependencies: update itertools from 0.7 to 0.8

5 years agodependencies: update itertools from 0.7 to 0.8
Matthias Krüger [Fri, 25 Jan 2019 19:25:14 +0000 (20:25 +0100)]
dependencies: update itertools from 0.7 to 0.8

5 years agoAuto merge of #3691 - phansch:update_changelog, r=oli-obk
bors [Fri, 25 Jan 2019 17:47:54 +0000 (17:47 +0000)]
Auto merge of #3691 - phansch:update_changelog, r=oli-obk

Update changelog with all changes since 0.0.212

This updates the changelog with all notable and user-facing changes since
0.0.212 has been released. I decided to group the changes by the Rust version
they are included in, as that's what makes the most sense to users.

Whenever a new rust version is released, we will have to go through the list
of commits and then update the changelog with the relevant changes.

[Rendered](https://github.com/rust-lang/rust-clippy/pull/3691/files?short_path=4ac32a7#diff-4ac32a78649ca5bdd8e0ba38b7006a1e)

5 years agoAdd script to fetch GitHub PRs between two commits
Philipp Hansch [Fri, 25 Jan 2019 17:07:50 +0000 (18:07 +0100)]
Add script to fetch GitHub PRs between two commits

5 years agoAuto merge of #3694 - phansch:fixed, r=phansch
bors [Fri, 25 Jan 2019 06:43:24 +0000 (06:43 +0000)]
Auto merge of #3694 - phansch:fixed, r=phansch

gitattributes: Treat .fixed files as rust files

This way GitHub treats them as Rust code :crab: :eyes:

5 years agogitattributes: Treat .fixed files as rust files
Philipp Hansch [Thu, 24 Jan 2019 19:39:00 +0000 (20:39 +0100)]
gitattributes: Treat .fixed files as rust files

5 years agoAuto merge of #3693 - phansch:rustup, r=matthiaskrgr
bors [Thu, 24 Jan 2019 19:40:31 +0000 (19:40 +0000)]
Auto merge of #3693 - phansch:rustup, r=matthiaskrgr

Rustup

Due to https://github.com/rust-lang/rust/pull/51285

5 years agoRustup
Philipp Hansch [Thu, 24 Jan 2019 19:32:18 +0000 (20:32 +0100)]
Rustup

Due to https://github.com/rust-lang/rust/pull/51285

5 years agoUpdate changelog with all changes since 0.0.212
Philipp Hansch [Thu, 24 Jan 2019 13:51:25 +0000 (14:51 +0100)]
Update changelog with all changes since 0.0.212

5 years agoFix `expect_fun_call` lint suggestions
Michael Wright [Thu, 24 Jan 2019 04:58:53 +0000 (06:58 +0200)]
Fix `expect_fun_call` lint suggestions

This commit corrects some bad suggestions produced by the
`expect_fun_call` lint and enables `rust-fix` checking on the tests.

Addresses #3630

5 years agoAuto merge of #3582 - Arkweid:add-lints-aseert-checks, r=flip1995
bors [Wed, 23 Jan 2019 17:42:30 +0000 (17:42 +0000)]
Auto merge of #3582 - Arkweid:add-lints-aseert-checks, r=flip1995

Add assert(true) and assert(false) lints

This PR add two lints on assert!(true) and assert!(false).
#3575

5 years agoallow assertions_on_constants for collapsible_if and missing_test_files
A.A.Abroskin [Wed, 23 Jan 2019 08:49:02 +0000 (11:49 +0300)]
allow assertions_on_constants for collapsible_if and missing_test_files

5 years agoMerge branch 'master' into add-lints-aseert-checks
A.A.Abroskin [Wed, 23 Jan 2019 08:36:12 +0000 (11:36 +0300)]
Merge branch 'master' into add-lints-aseert-checks

* master: (58 commits)
  Rustfmt all the things
  Don't make decisions on values that don't represent the decision
  Improving comments.
  Rustup
  Added rustfix to the test.
  Improve span shortening.
  Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool".
  Actually check for constants.
  Fixed potential mistakes with nesting. Added tests.
  formatting fix
  Update clippy_lints/src/needless_bool.rs
  formatting fix
  Fixing typo in CONTRIBUTING.md
  Fix breakage due to rust-lang/rust#57651
  needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement
  Fix automatic suggestion on `use_self`.
  Remove negative integer literal checks.
  Fix `implicit_return` false positives.
  Run rustfmt
  Fixed breakage due to rust-lang/rust#57489
  ...

5 years agoAuto merge of #3684 - g-bartoszek:sugg-snippet-modifications, r=phansch
bors [Tue, 22 Jan 2019 20:18:11 +0000 (20:18 +0000)]
Auto merge of #3684 - g-bartoszek:sugg-snippet-modifications, r=phansch

"make_return" and "blockify" convenience methods, fixes #3683

…ed them in "needless_bool".

5 years agoAuto merge of #3679 - daxpedda:use_self, r=phansch
bors [Tue, 22 Jan 2019 19:18:39 +0000 (19:18 +0000)]
Auto merge of #3679 - daxpedda:use_self, r=phansch

Fix automatic suggestion on `use_self`.

In an example like this:
```rust
impl Example {
    fn fun_1() { }
    fn fun_2() {
        Example::fun_1();
    }
}
```
Clippy tries to replace `Example::fun_1` with `Self`, loosing `::fun_1` in the process, it should rather try to replace `Example` with `Self`.

**Question**
- There may be other paths that need the same treatment, but I'm not sure I understand them fully:
  - https://github.com/rust-lang/rust-clippy/blob/e648adf0866a1cea7db6ce2d33ea86e442f25377/clippy_lints/src/use_self.rs#L94-L96
  - https://github.com/rust-lang/rust-clippy/blob/e648adf0866a1cea7db6ce2d33ea86e442f25377/clippy_lints/src/use_self.rs#L225-L229

5 years agoAuto merge of #3685 - rust-lang:rustup, r=flip1995
bors [Tue, 22 Jan 2019 16:07:32 +0000 (16:07 +0000)]
Auto merge of #3685 - rust-lang:rustup, r=flip1995

Rustup

5 years agoRustfmt all the things
Oliver Scherer [Tue, 22 Jan 2019 15:27:42 +0000 (16:27 +0100)]
Rustfmt all the things

5 years agoDon't make decisions on values that don't represent the decision
Oliver Scherer [Tue, 22 Jan 2019 14:28:51 +0000 (15:28 +0100)]
Don't make decisions on values that don't represent the decision

5 years agoImproving comments.
daxpedda [Tue, 22 Jan 2019 14:23:45 +0000 (15:23 +0100)]
Improving comments.

5 years agoRustup
Oliver Scherer [Tue, 22 Jan 2019 14:17:05 +0000 (15:17 +0100)]
Rustup

5 years agoAdded rustfix to the test.
daxpedda [Tue, 22 Jan 2019 14:16:54 +0000 (15:16 +0100)]
Added rustfix to the test.

5 years agoImprove span shortening.
Philipp Krones [Tue, 22 Jan 2019 13:43:59 +0000 (14:43 +0100)]
Improve span shortening.

Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
5 years agoAdded "make_return" and "blockify" convenience methods in Sugg and used them in ...
Grzegorz Bartoszek [Tue, 22 Jan 2019 11:33:47 +0000 (12:33 +0100)]
Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool".

5 years agoAuto merge of #3677 - daxpedda:integer_arithmetic, r=oli-obk
bors [Mon, 21 Jan 2019 15:07:22 +0000 (15:07 +0000)]
Auto merge of #3677 - daxpedda:integer_arithmetic, r=oli-obk

Remove negative integer literal checks.

Fixes #3678.

5 years agoActually check for constants.
daxpedda [Mon, 21 Jan 2019 12:59:49 +0000 (13:59 +0100)]
Actually check for constants.

5 years agoAuto merge of #3676 - daxpedda:implicit_return, r=oli-obk
bors [Mon, 21 Jan 2019 12:25:45 +0000 (12:25 +0000)]
Auto merge of #3676 - daxpedda:implicit_return, r=oli-obk

Fix `implicit_return` false positives.

Fixes the following false positives:
- linting on `if let` without `else` in a `loop` even with a present `return`
- linting on `unreachable!()`

5 years agoFixed potential mistakes with nesting. Added tests.
daxpedda [Mon, 21 Jan 2019 12:06:32 +0000 (13:06 +0100)]
Fixed potential mistakes with nesting. Added tests.

5 years agoAuto merge of #3680 - g-bartoszek:needless-bool-else-if-brackets, r=oli-obk
bors [Mon, 21 Jan 2019 11:47:06 +0000 (11:47 +0000)]
Auto merge of #3680 - g-bartoszek:needless-bool-else-if-brackets, r=oli-obk

needless bool lint suggestion is wrapped in brackets if it is an "els…

…e" clause of an "if-else" statement

5 years agoformatting fix
Grzegorz Bartoszek [Mon, 21 Jan 2019 11:04:15 +0000 (12:04 +0100)]
formatting fix

5 years agoUpdate clippy_lints/src/needless_bool.rs
Oliver Scherer [Mon, 21 Jan 2019 10:41:33 +0000 (11:41 +0100)]
Update clippy_lints/src/needless_bool.rs

Co-Authored-By: g-bartoszek <grzegorz.bartoszek@thaumatec.com>
5 years agoformatting fix
Grzegorz Bartoszek [Mon, 21 Jan 2019 10:14:34 +0000 (11:14 +0100)]
formatting fix

5 years agoAuto merge of #3681 - rmcteggart-r7:master, r=matthiaskrgr
bors [Sun, 20 Jan 2019 22:21:00 +0000 (22:21 +0000)]
Auto merge of #3681 - rmcteggart-r7:master, r=matthiaskrgr

Fixing typo in CONTRIBUTING.md

Noticed small typo in CONTRIBUTING readme when working on another issue

5 years agoAuto merge of #3675 - mikerite:fix-build-20190120, r=matthiaskrgr
bors [Sun, 20 Jan 2019 21:52:18 +0000 (21:52 +0000)]
Auto merge of #3675 - mikerite:fix-build-20190120, r=matthiaskrgr

Fix build 20190120

5 years agoFixing typo in CONTRIBUTING.md
rmcteggart-r7 [Sun, 20 Jan 2019 21:25:36 +0000 (21:25 +0000)]
Fixing typo in CONTRIBUTING.md

5 years agoFix breakage due to rust-lang/rust#57651
Michael Wright [Sun, 20 Jan 2019 20:54:04 +0000 (22:54 +0200)]
Fix breakage due to rust-lang/rust#57651

5 years agoneedless bool lint suggestion is wrapped in brackets if it is an "else" clause of...
Grzegorz Bartoszek [Sun, 20 Jan 2019 15:15:00 +0000 (16:15 +0100)]
needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement

5 years agoFix automatic suggestion on `use_self`.
daxpedda [Sun, 20 Jan 2019 13:50:26 +0000 (14:50 +0100)]
Fix automatic suggestion on `use_self`.

5 years agoRemove negative integer literal checks.
daxpedda [Sun, 20 Jan 2019 13:18:31 +0000 (14:18 +0100)]
Remove negative integer literal checks.

5 years agoFix `implicit_return` false positives.
daxpedda [Sun, 20 Jan 2019 12:45:22 +0000 (13:45 +0100)]
Fix `implicit_return` false positives.

5 years agoRun rustfmt
Michael Wright [Sun, 20 Jan 2019 10:49:45 +0000 (12:49 +0200)]
Run rustfmt

5 years agoFixed breakage due to rust-lang/rust#57489
Michael Wright [Sun, 20 Jan 2019 10:21:30 +0000 (12:21 +0200)]
Fixed breakage due to rust-lang/rust#57489

5 years agoFix breakage due to rust-lang/rust#57755
Michael Wright [Sun, 20 Jan 2019 08:14:23 +0000 (10:14 +0200)]
Fix breakage due to rust-lang/rust#57755

5 years agoAuto merge of #3674 - sinkuu:fmt_rustup, r=oli-obk
bors [Sat, 19 Jan 2019 12:40:46 +0000 (12:40 +0000)]
Auto merge of #3674 - sinkuu:fmt_rustup, r=oli-obk

Catch up with `format_args` change

Catches up with a change in rust-lang/rust#57537. (Since the optimization is optional, this clippy PR can be merged before the rustc PR.)

Happened to fix a bug in `expect_fun_call`, that is the lint ignores more than
one arguments to `format`.

```
warning: use of `expect` followed by a function call
 --> src/main.rs:2:17
  |
2 |     Some("foo").expect(format!("{} {}", 1, 2).as_ref());
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{} {}", 1))`
  |
```

5 years agoCatch up with `format_args` change
Shotaro Yamada [Sat, 19 Jan 2019 12:13:06 +0000 (21:13 +0900)]
Catch up with `format_args` change

Catches up with a change in rust-lang/rust#57537

Happened to fix a bug in `expect_fun_call`, that is the lint ignores more than
one arguments to `format`.