]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUpdate types.rs
Simon Farnsworth [Thu, 2 Apr 2020 13:29:08 +0000 (14:29 +0100)]
Update types.rs

4 years agoUpdate types.rs
Simon Farnsworth [Thu, 2 Apr 2020 13:28:25 +0000 (14:28 +0100)]
Update types.rs

4 years agoImprove docs for option_option
Simon Farnsworth [Thu, 2 Apr 2020 09:03:15 +0000 (10:03 +0100)]
Improve docs for option_option

Hint about using tri-state enums to replace legitimate uses of `Option<Option<_>>`

4 years agoAuto merge of #5349 - jpospychala:useless_rc, r=Manishearth
bors [Thu, 2 Apr 2020 03:11:29 +0000 (03:11 +0000)]
Auto merge of #5349 - jpospychala:useless_rc, r=Manishearth

useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>

refers to  #2394

changelog: Add lints for Rc<Rc<T>> and Rc<Box<T>> and Rc<&T>, Box<&T>

this is based on top of another change #5310 so probably should go after that one.

4 years agouseless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>
Jacek Pospychala [Thu, 12 Mar 2020 20:41:13 +0000 (21:41 +0100)]
useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>

4 years agoAuto merge of #5402 - pmk21:allow-let-underscore-must-use, r=flip1995
bors [Wed, 1 Apr 2020 21:43:44 +0000 (21:43 +0000)]
Auto merge of #5402 - pmk21:allow-let-underscore-must-use, r=flip1995

Allow let_underscore_must_use to be ignored

changelog: none
Fixes #5366

4 years agoAuto merge of #5401 - dtolnay:option, r=Manishearth
bors [Wed, 1 Apr 2020 21:30:24 +0000 (21:30 +0000)]
Auto merge of #5401 - dtolnay:option, r=Manishearth

Downgrade option_option to pedantic

Based on a search of my work codebase (\>500k lines) for `Option<Option<`, it looks like a bunch of reasonable uses to me. The documented motivation for this lint is:

> an optional optional value is logically the same thing as an optional value but has an unneeded extra level of wrapping

which seems a bit bogus in practice. For example a typical usage would look like:

```rust
let mut host: Option<String> = None;
let mut port: Option<i32> = None;
let mut payload: Option<Option<String>> = None;

for each field {
    match field.name {
        "host" => host = Some(...),
        "port" => port = Some(...),
        "payload" => payload = Some(...), // can be null or string
        _ => return error,
    }
}

let host = host.ok_or(...)?;
let port = port.ok_or(...)?;
let payload = payload.ok_or(...)?;
do_thing(host, port, payload)
```

This lint seems to fit right in with the pedantic group; I don't think linting on occurrences of `Option<Option<T>>` by default is justified.

---

changelog: Remove option_option from default set of enabled lints

4 years agoAllow let_underscore
pmk21 [Wed, 1 Apr 2020 19:18:16 +0000 (00:48 +0530)]
Allow let_underscore

4 years agoUpdate option_option ui test
David Tolnay [Wed, 1 Apr 2020 19:15:21 +0000 (12:15 -0700)]
Update option_option ui test

4 years agoTest for ignoring let_underscore_must_use
pmk21 [Wed, 1 Apr 2020 19:14:09 +0000 (00:44 +0530)]
Test for ignoring let_underscore_must_use

4 years agoDowngrade option_option to pedantic
David Tolnay [Wed, 1 Apr 2020 19:00:49 +0000 (12:00 -0700)]
Downgrade option_option to pedantic

4 years agoAuto merge of #5400 - flip1995:rustup, r=Manishearth
bors [Wed, 1 Apr 2020 18:51:38 +0000 (18:51 +0000)]
Auto merge of #5400 - flip1995:rustup, r=Manishearth

Rustups

r? @Manishearth

changelog: none

4 years agoFix dogfood fallout
flip1995 [Wed, 1 Apr 2020 18:24:46 +0000 (20:24 +0200)]
Fix dogfood fallout

4 years agoRustup to rust-lang/rust#70632
flip1995 [Wed, 1 Apr 2020 18:14:05 +0000 (20:14 +0200)]
Rustup to rust-lang/rust#70632

4 years agoRustup to rust-lang/rust#70081
flip1995 [Wed, 1 Apr 2020 18:12:36 +0000 (20:12 +0200)]
Rustup to rust-lang/rust#70081

4 years agoRustup to rust-lang/rust#70627
flip1995 [Wed, 1 Apr 2020 17:42:15 +0000 (19:42 +0200)]
Rustup to rust-lang/rust#70627

4 years agoAuto merge of #5398 - flip1995:deescalate, r=Manishearth
bors [Tue, 31 Mar 2020 15:36:54 +0000 (15:36 +0000)]
Auto merge of #5398 - flip1995:deescalate, r=Manishearth

Stop updating the lint counter with every new lint

r? @Manishearth

This PR does two things:

1. Clean up the clippy_dev module a bit (first 3 commits; cc #5394 )
2. Make the counter in the README count in steps of 50 lints. Also use a `lazy_static` `Vec` for the lint list, so no counter is required there anymore.

changelog: none

4 years agoRun update_lints
flip1995 [Tue, 31 Mar 2020 15:23:30 +0000 (17:23 +0200)]
Run update_lints

4 years agoDon't use an exact lint counter anymore
flip1995 [Tue, 31 Mar 2020 15:23:14 +0000 (17:23 +0200)]
Don't use an exact lint counter anymore

4 years agoMove update_lints logic to its own module
flip1995 [Tue, 31 Mar 2020 13:14:29 +0000 (15:14 +0200)]
Move update_lints logic to its own module

4 years agoMake limit_stderr_length a subcommand
flip1995 [Tue, 31 Mar 2020 13:13:38 +0000 (15:13 +0200)]
Make limit_stderr_length a subcommand

4 years agoDefine modules in lib.rs instead of main.rs
flip1995 [Tue, 31 Mar 2020 13:09:11 +0000 (15:09 +0200)]
Define modules in lib.rs instead of main.rs

4 years agoAuto merge of #5397 - pmk21:macro-single-match, r=flip1995
bors [Tue, 31 Mar 2020 11:45:43 +0000 (11:45 +0000)]
Auto merge of #5397 - pmk21:macro-single-match, r=flip1995

Avoid single_match lint in macro rules

changelog: none
fixes #5359

4 years agoSmall formatting change
pmk21 [Tue, 31 Mar 2020 10:43:51 +0000 (16:13 +0530)]
Small formatting change

4 years agoSkip single_match lints in macro rules
pmk21 [Tue, 31 Mar 2020 10:20:15 +0000 (15:50 +0530)]
Skip single_match lints in macro rules

4 years agoAdded test for single_match_else in macro
pmk21 [Tue, 31 Mar 2020 10:19:49 +0000 (15:49 +0530)]
Added test for single_match_else in macro

4 years agoAdded test for single_match in macro
pmk21 [Tue, 31 Mar 2020 10:19:27 +0000 (15:49 +0530)]
Added test for single_match in macro

4 years agoAuto merge of #5293 - matthiaskrgr:macro_skip_lifetime, r=phansch
bors [Mon, 30 Mar 2020 21:33:49 +0000 (21:33 +0000)]
Auto merge of #5293 - matthiaskrgr:macro_skip_lifetime, r=phansch

don't emit lifetime lint warnings for code inside macros.

Fixes #5283

changelog: Don't emit lifetime lint warnings for code inside macros.

4 years agodon't emit lifetime lints for code inside macros.
Matthias Krüger [Mon, 30 Mar 2020 18:01:57 +0000 (20:01 +0200)]
don't emit lifetime lints for code inside macros.

Fixes #5283

4 years agoAuto merge of #5294 - tmiasko:trait-ptr-cmp, r=Manishearth
bors [Mon, 30 Mar 2020 19:52:41 +0000 (19:52 +0000)]
Auto merge of #5294 - tmiasko:trait-ptr-cmp, r=Manishearth

Lint unnamed address comparisons

Functions and vtables have an insignificant address. Attempts to compare such addresses will lead to very surprising behaviour. For example: addresses of different functions could compare equal; two trait object pointers representing the same object and the same type could be unequal.

Lint against unnamed address comparisons to avoid issues like those in rust-lang/rust#69757 and rust-lang/rust#54685.

changelog: New lints: [`fn_address_comparisons`] [#5294](https://github.com/rust-lang/rust-clippy/pull/5294), [`vtable_address_comparisons`] [#5294](https://github.com/rust-lang/rust-clippy/pull/5294)

4 years agoLint unnamed address comparisons
Tomasz Miąsko [Thu, 12 Mar 2020 00:00:00 +0000 (00:00 +0000)]
Lint unnamed address comparisons

4 years agoAuto merge of #5365 - mgr-inz-rafal:issue4983_bool_updates, r=yaahc
bors [Mon, 30 Mar 2020 19:20:10 +0000 (19:20 +0000)]
Auto merge of #5365 - mgr-inz-rafal:issue4983_bool_updates, r=yaahc

Issue4983 bool updates

changelog: Check for bool inequality comparison that might be written more concisely

Fixes #4983

4 years agoUpdate clippy_lints/src/needless_bool.rs
Jane Lusby [Mon, 30 Mar 2020 19:19:30 +0000 (12:19 -0700)]
Update clippy_lints/src/needless_bool.rs

4 years agoAuto merge of #5373 - flip1995:doc_release_backport, r=Manishearth
bors [Mon, 30 Mar 2020 18:53:05 +0000 (18:53 +0000)]
Auto merge of #5373 - flip1995:doc_release_backport, r=Manishearth

Document how to create releases and backports

This PR adds documentation on how to create Clippy releases and backports.

This PR also introduces a new backport/release process for Clippy:

- A beta branch is introduced: https://github.com/rust-lang/rust-clippy/tree/beta
- Backports are now done by PRs to the `beta` branch
- also commits to the beta branch will be deployed, so that the documentation page has a tab for the Clippy beta release.

This has two advantages:

1. The Clippy release process is closer to the Rust release process: stable releases are tagged, the beta release has its own branch
2. Backports to beta are easier, since they don't need as much coordination as before. No new branch has to be created for a backport. Just a PR to the beta branch, like in the Rust repo.¹

I tested the deployment here: https://github.com/flip1995/rust-clippy/runs/534465081 and it created this commit: https://github.com/flip1995/rust-clippy/commit/734503377e5ade55864ee674c010227a780cbf34, so it works.

r? @Manishearth your thoughts?

[Rendered (release.md)](https://github.com/flip1995/rust-clippy/blob/doc_release_backport/doc/release.md)
[Rendered (backport.md)](https://github.com/flip1995/rust-clippy/blob/doc_release_backport/doc/backport.md)

changelog: none

---

¹: For this, we may have to modify the CI, so that beta rustc is used to check PRs to beta (or we test it locally, and merge it without bors)

4 years agoAuto merge of #5387 - jpospychala:useless_self_fp, r=yaahc
bors [Mon, 30 Mar 2020 18:10:21 +0000 (18:10 +0000)]
Auto merge of #5387 - jpospychala:useless_self_fp, r=yaahc

`unused_self` false positive

fixes #5351

Remove the for loop in `unused_self` so that lint enabled for one method doesn't trigger on another method.

changelog: Fix false positive in `unused_self` around lint gates on impl items

4 years agoFix typo in `release.md`
Philipp Krones [Mon, 30 Mar 2020 17:32:48 +0000 (19:32 +0200)]
Fix typo in `release.md`

Co-Authored-By: Phil Hansch <dev@phansch.net>
4 years agoAuto merge of #5392 - matthiaskrgr:rustup_40, r=phansch
bors [Mon, 30 Mar 2020 13:22:34 +0000 (13:22 +0000)]
Auto merge of #5392 - matthiaskrgr:rustup_40, r=phansch

rustup  https://github.com/rust-lang/rust/pull/70536

changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/70536
Matthias Krüger [Mon, 30 Mar 2020 09:02:14 +0000 (11:02 +0200)]
rustup  https://github.com/rust-lang/rust/pull/70536

4 years agoAuto merge of #5380 - lzutao:deprecate-REPLACE_CONSTS, r=phansch
bors [Mon, 30 Mar 2020 08:03:42 +0000 (08:03 +0000)]
Auto merge of #5380 - lzutao:deprecate-REPLACE_CONSTS, r=phansch

Deprecate REPLACE_CONSTS lint

Closes #5346
changelog: Deprecate `replace_consts` lint

4 years agoAuto merge of #5390 - phansch:rustupp, r=matthiaskrgr
bors [Mon, 30 Mar 2020 07:31:25 +0000 (07:31 +0000)]
Auto merge of #5390 - phansch:rustupp, r=matthiaskrgr

Rustup to https://github.com/rust-lang/rust/pull/70449

cc https://github.com/rust-lang/rust/pull/70449

changelog: none

4 years agoRustup to https://github.com/rust-lang/rust/pull/70449
Philipp Hansch [Mon, 30 Mar 2020 05:34:19 +0000 (07:34 +0200)]
Rustup to https://github.com/rust-lang/rust/pull/70449

4 years ago`unused_self` false positive
Jacek Pospychala [Sun, 29 Mar 2020 20:22:28 +0000 (22:22 +0200)]
`unused_self` false positive

4 years agoAuto merge of #5382 - richkadel:gitattributes-macro, r=phansch
bors [Sun, 29 Mar 2020 18:14:38 +0000 (18:14 +0000)]
Auto merge of #5382 - richkadel:gitattributes-macro, r=phansch

git attribute macros not allowed in submodules

This change simply moves the `rust` macro definition directly into the
attributes for `*.rs` files.

git commands that recurse from the rust toplevel tree into submodules
produce errors in clippy due to the fact that:

  "Custom macro attributes can be defined only in top-level
  gitattributes files"

For example, from the toplevel `rust` directory in a rustc development
build, try:

  $ git grep "search string" --recurse-submodules

Embedded within the actual results is the error message:

  [attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
   not allowed: src/tools/clippy/.gitattributes:1

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 `cargo dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo 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

4 years agoAuto merge of #5384 - matthiaskrgr:readme_4, r=matthiaskrgr
bors [Sun, 29 Mar 2020 15:28:56 +0000 (15:28 +0000)]
Auto merge of #5384 - matthiaskrgr:readme_4, r=matthiaskrgr

readme: move "how to run single lint" instructions to "Allowing/denying lints" section.

changelog: none

4 years agoreadme: move "how to run single lint" instructions to "Allowing/denying lints" section.
Matthias Krüger [Sun, 29 Mar 2020 14:57:09 +0000 (16:57 +0200)]
readme: move "how to run single lint" instructions to "Allowing/denying lints" section.

4 years agogit attribute macros not allowed in submodules
Rich Kadel [Sun, 29 Mar 2020 13:58:37 +0000 (06:58 -0700)]
git attribute macros not allowed in submodules

This change simply moves the `rust` macro definition directly into the
attributes for `*.rs` files.

git commands that recurse from the rust toplevel tree into submodules
produce errors in clippy due to the fact that:

  "Custom macro attributes can be defined only in top-level
  gitattributes files"

For example, from the toplevel `rust` directory in a rustc development
build, try:

  $ git grep "search string" --recurse-submodules

Embedded within the actual results is the error message:

  [attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
   not allowed: src/tools/clippy/.gitattributes:1

4 years agoAuto merge of #5381 - lzutao:itertools, r=matthiaskrgr
bors [Sun, 29 Mar 2020 13:19:32 +0000 (13:19 +0000)]
Auto merge of #5381 - lzutao:itertools, r=matthiaskrgr

Bump itertools

changelog: none

4 years agoDeprecate REPLACE_CONSTS lint
Lzu Tao [Sun, 29 Mar 2020 05:59:35 +0000 (12:59 +0700)]
Deprecate REPLACE_CONSTS lint

4 years agoBump itertools
Lzu Tao [Sun, 29 Mar 2020 05:50:11 +0000 (12:50 +0700)]
Bump itertools

4 years agoAuto merge of #5376 - flip1995:verbose_file_reads_restriction, r=matthiaskrgr
bors [Fri, 27 Mar 2020 20:13:06 +0000 (20:13 +0000)]
Auto merge of #5376 - flip1995:verbose_file_reads_restriction, r=matthiaskrgr

Move verbose_file_reads to restriction

cc #5368

Using `File::read` instead of  `fs::read_to_end` does make sense in multiple cases, so this lint is rather restriction, than complexity

changelog: Move [`verbose_file_reads`] to restriction

4 years agoAuto merge of #5377 - matthiaskrgr:rustup_38, r=flip1995
bors [Fri, 27 Mar 2020 19:57:44 +0000 (19:57 +0000)]
Auto merge of #5377 - matthiaskrgr:rustup_38, r=flip1995

rustup

changelog: none

4 years agoremove redundant import
Matthias Krüger [Fri, 27 Mar 2020 19:47:34 +0000 (20:47 +0100)]
remove redundant import

4 years agorustup https://github.com/rust-lang/rust/pull/68404
Matthias Krüger [Fri, 27 Mar 2020 14:41:56 +0000 (15:41 +0100)]
rustup https://github.com/rust-lang/rust/pull/68404

4 years agorustup https://github.com/rust-lang/rust/pull/69644
Matthias Krüger [Fri, 27 Mar 2020 14:35:25 +0000 (15:35 +0100)]
rustup https://github.com/rust-lang/rust/pull/69644

4 years agorustup https://github.com/rust-lang/rust/pull/70344
Matthias Krüger [Fri, 27 Mar 2020 14:34:29 +0000 (15:34 +0100)]
rustup https://github.com/rust-lang/rust/pull/70344

4 years agoMove verbose_file_reads to restriction
flip1995 [Thu, 26 Mar 2020 14:01:03 +0000 (15:01 +0100)]
Move verbose_file_reads to restriction

4 years agoAlso deploy from the beta branch
flip1995 [Wed, 25 Mar 2020 19:01:11 +0000 (20:01 +0100)]
Also deploy from the beta branch

4 years agoDocument how to backport changes to beta
flip1995 [Wed, 25 Mar 2020 18:42:24 +0000 (19:42 +0100)]
Document how to backport changes to beta

4 years agoDocument how to create a Clippy release
flip1995 [Wed, 25 Mar 2020 18:09:04 +0000 (19:09 +0100)]
Document how to create a Clippy release

4 years agoAuto merge of #5334 - flip1995:backport_remerge, r=flip1995
bors [Wed, 25 Mar 2020 18:07:35 +0000 (18:07 +0000)]
Auto merge of #5334 - flip1995:backport_remerge, r=flip1995

Backport remerge

blocked on landing the backport

cc @ehuss

changelog: none

4 years agoAuto merge of #5372 - matthiaskrgr:rpc_nursery, r=flip1995
bors [Wed, 25 Mar 2020 17:21:15 +0000 (17:21 +0000)]
Auto merge of #5372 - matthiaskrgr:rpc_nursery, r=flip1995

move redundant_pub_crate to nursery

cc #5369
changelog: none

4 years agomove redundant_pub_crate to nursery
Matthias Krüger [Wed, 25 Mar 2020 17:09:25 +0000 (18:09 +0100)]
move redundant_pub_crate to nursery

cc #5369

4 years agoAuto merge of #5371 - matthiaskrgr:rdm, r=phansch
bors [Wed, 25 Mar 2020 10:50:38 +0000 (10:50 +0000)]
Auto merge of #5371 - matthiaskrgr:rdm, r=phansch

readme: explain how to run only a single lint on a codebase

changelog: none

4 years agoreadme: explain how to run only a single lint on a codebase
Matthias Krüger [Wed, 25 Mar 2020 10:36:17 +0000 (11:36 +0100)]
readme: explain how to run only a single lint on a codebase

4 years agoAuto merge of #5370 - phansch:matches, r=matthiaskrgr
bors [Wed, 25 Mar 2020 07:38:00 +0000 (07:38 +0000)]
Auto merge of #5370 - phansch:matches, r=matthiaskrgr

Remove dependency on `matches` crate

The std equivalent works exactly the same.

changelog: none

4 years agoRemove dependency on `matches` crate
Philipp Hansch [Wed, 25 Mar 2020 06:50:08 +0000 (07:50 +0100)]
Remove dependency on `matches` crate

The std equivalent works exactly the same.

4 years agoAuto merge of #5364 - flip1995:useless_transmute_quarantine, r=Manishearth
bors [Mon, 23 Mar 2020 20:52:57 +0000 (20:52 +0000)]
Auto merge of #5364 - flip1995:useless_transmute_quarantine, r=Manishearth

Move useless_transmute to nursery

cc #5343

@rust-lang/clippy anyone against moving this to nursery?

changelog: Move [`useless_transmute`] to nursery

4 years agoAuto merge of #5319 - 1tgr:master, r=flip1995
bors [Mon, 23 Mar 2020 20:35:49 +0000 (20:35 +0000)]
Auto merge of #5319 - 1tgr:master, r=flip1995

Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them

changelog: Add `redundant_pub_crate` lint

Closes #5274.

4 years agoCode clean-up and formatting
mgr-inz-rafal [Mon, 23 Mar 2020 20:21:18 +0000 (21:21 +0100)]
Code clean-up and formatting

4 years agoProvide appropriate suggestion
mgr-inz-rafal [Mon, 23 Mar 2020 20:00:02 +0000 (21:00 +0100)]
Provide appropriate suggestion

4 years agoMove useless_transmute to nursery
flip1995 [Mon, 23 Mar 2020 19:08:07 +0000 (20:08 +0100)]
Move useless_transmute to nursery

4 years agoInitial lint without suggestion
mgr-inz-rafal [Mon, 23 Mar 2020 19:29:12 +0000 (20:29 +0100)]
Initial lint without suggestion

4 years agonursery group -> style
Tim Robinson [Mon, 23 Mar 2020 16:06:15 +0000 (16:06 +0000)]
nursery group -> style

4 years agoAuto merge of #5350 - ThibsG:FixSingleBindingClosure, r=flip1995
bors [Mon, 23 Mar 2020 15:17:09 +0000 (15:17 +0000)]
Auto merge of #5350 - ThibsG:FixSingleBindingClosure, r=flip1995

Fix single binding closure

Fix the `match_single_binding` lint when triggered inside a closure.

Fixes: #5347
changelog: Improve suggestion for [`match_single_binding`]

4 years agoAuto merge of #5361 - matthiaskrgr:rustup_37, r=flip1995
bors [Mon, 23 Mar 2020 14:41:57 +0000 (14:41 +0000)]
Auto merge of #5361 - matthiaskrgr:rustup_37, r=flip1995

rustup https://github.com/rust-lang/rust/pull/69968/

changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/69968/
Matthias Krüger [Mon, 23 Mar 2020 14:21:46 +0000 (15:21 +0100)]
rustup https://github.com/rust-lang/rust/pull/69968/

4 years agoAuto merge of #5353 - flip1995:conf_doc, r=Manishearth
bors [Sun, 22 Mar 2020 18:54:58 +0000 (18:54 +0000)]
Auto merge of #5353 - flip1995:conf_doc, r=Manishearth

Fix documentation generation for configurable lints

In #5135, the configuration macro changed, but the documentation generation script wasn't updated. This PR catches up on this.

[Preview](https://flip1995.github.io/rust-clippy/master/index.html)

r? @Manishearth

changelog: Document configuration options of lints again.

4 years agoFix documentation generation for configurable lints
flip1995 [Sun, 22 Mar 2020 17:15:06 +0000 (18:15 +0100)]
Fix documentation generation for configurable lints

4 years agoFix single binding in closure
ThibsG [Sat, 21 Mar 2020 19:26:55 +0000 (20:26 +0100)]
Fix single binding in closure

4 years agoUpdate for PR feedback
Tim Robinson [Fri, 20 Mar 2020 22:49:15 +0000 (22:49 +0000)]
Update for PR feedback

4 years agoAuto merge of #5323 - rabisg0:fix/5284, r=flip1995
bors [Fri, 20 Mar 2020 12:45:30 +0000 (12:45 +0000)]
Auto merge of #5323 - rabisg0:fix/5284, r=flip1995

Improvement: Don't show function body in needless_lifetimes

Changes the span on which the lint is reported to point to only the
function return type instead of the entire function body.
Fixes #5284

changelog: none

4 years agoAuto merge of #5342 - flip1995:rollup-77s2pmt, r=flip1995
bors [Thu, 19 Mar 2020 15:26:41 +0000 (15:26 +0000)]
Auto merge of #5342 - flip1995:rollup-77s2pmt, r=flip1995

Rollup of 4 pull requests

Successful merges:

 - #5326 (rustup https://github.com/rust-lang/rust/pull/69838)
 - #5333 (rustup https://github.com/rust-lang/rust/pull/69189)
 - #5336 (rustup https://github.com/rust-lang/rust/pull/69920/)
 - #5341 (Rustup to rust-lang/rust#66131)

Failed merges:

r? @ghost

changelog: none

4 years agoGet integration test binary from deps dir
flip1995 [Thu, 19 Mar 2020 12:58:08 +0000 (13:58 +0100)]
Get integration test binary from deps dir

cc rust-lang/cargo#7965

4 years agoRollup merge of #5341 - flip1995:rustup, r=flip1995
Philipp Krones [Thu, 19 Mar 2020 14:00:32 +0000 (15:00 +0100)]
Rollup merge of #5341 - flip1995:rustup, r=flip1995

Rustup to rust-lang/rust#66131

changelog: none

4 years agoRollup merge of #5336 - matthiaskrgr:rustup_35, r=flip1995
Philipp Krones [Thu, 19 Mar 2020 14:00:31 +0000 (15:00 +0100)]
Rollup merge of #5336 - matthiaskrgr:rustup_35, r=flip1995

rustup https://github.com/rust-lang/rust/pull/69920/

changelog: none

4 years agoRollup merge of #5333 - matthiaskrgr:rustup_34, r=flip1995
Philipp Krones [Thu, 19 Mar 2020 14:00:30 +0000 (15:00 +0100)]
Rollup merge of #5333 - matthiaskrgr:rustup_34, r=flip1995

rustup https://github.com/rust-lang/rust/pull/69189

rustups https://github.com/rust-lang/rust/pull/69189 which is part of https://github.com/rust-lang/rust/pull/70085
(at least I think this is the only pr that changes clippy test stdout)

changelog: none

4 years agoRollup merge of #5326 - matthiaskrgr:rustup_33, r=flip1995
Philipp Krones [Thu, 19 Mar 2020 14:00:29 +0000 (15:00 +0100)]
Rollup merge of #5326 - matthiaskrgr:rustup_33, r=flip1995

rustup https://github.com/rust-lang/rust/pull/69838

changelog: none

4 years agoRustup to rust-lang/rust#66131
flip1995 [Thu, 19 Mar 2020 13:33:10 +0000 (14:33 +0100)]
Rustup to rust-lang/rust#66131

4 years agorustup https://github.com/rust-lang/rust/pull/69920/
Matthias Krüger [Wed, 18 Mar 2020 22:45:02 +0000 (23:45 +0100)]
rustup https://github.com/rust-lang/rust/pull/69920/

4 years agoImprovement: Don't show function body in needless_lifetimes
Rabi Guha [Mon, 16 Mar 2020 11:44:24 +0000 (17:14 +0530)]
Improvement: Don't show function body in needless_lifetimes

Changes the span on which the lint is reported to point to only the
function return type instead of the entire function body.
Fixes #5284

4 years agoAuto merge of #5335 - flip1995:changelog, r=Manishearth
bors [Wed, 18 Mar 2020 20:34:58 +0000 (20:34 +0000)]
Auto merge of #5335 - flip1995:changelog, r=Manishearth

Update changelog to 1.43.0 beta

In the beta changelog update, I accidentally used the commit of the 1.43.0 beta, instead of the 1.42.0 beta. I fixed this in this PR.

[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)

r? @Manishearth

changelog: none

4 years agoAuto merge of #5329 - matthiaskrgr:int_arith_on_ref_5328, r=flip1995
bors [Wed, 18 Mar 2020 14:56:05 +0000 (14:56 +0000)]
Auto merge of #5329 - matthiaskrgr:int_arith_on_ref_5328, r=flip1995

integer_arithmetic: detect integer arithmetic on references.

changelog: integer_arithmetic fix false negatives with references on integers

Fixes #5328

4 years agotests: arithmetic: split into integer_arithmetic and float_arithmetic files.
Matthias Krüger [Wed, 18 Mar 2020 14:41:42 +0000 (15:41 +0100)]
tests: arithmetic: split into integer_arithmetic and float_arithmetic files.

4 years agoAuto merge of #5331 - matthiaskrgr:lint_docs1, r=flip1995
bors [Wed, 18 Mar 2020 14:34:34 +0000 (14:34 +0000)]
Auto merge of #5331 - matthiaskrgr:lint_docs1, r=flip1995

clean up a few lint docs

changelog: none

4 years agoFix limit-stderr-files test
flip1995 [Wed, 18 Mar 2020 14:27:25 +0000 (15:27 +0100)]
Fix limit-stderr-files test

4 years agoSplit up checked_unwrap test further
flip1995 [Wed, 18 Mar 2020 14:24:48 +0000 (15:24 +0100)]
Split up checked_unwrap test further

4 years agoAuto merge of #5330 - matthiaskrgr:newlint_expl, r=flip1995
bors [Wed, 18 Mar 2020 13:58:41 +0000 (13:58 +0000)]
Auto merge of #5330 - matthiaskrgr:newlint_expl, r=flip1995

new_lint.rs: encourage authors to write more detailed code samples in lint descriptions (linted as well as fixed code)

changelog: none

4 years agoUpdate changelog to 1.43.0 beta
flip1995 [Wed, 18 Mar 2020 13:49:40 +0000 (14:49 +0100)]
Update changelog to 1.43.0 beta

4 years agointeger_arithmetic: detect integer arithmetic on references.
Matthias Krüger [Tue, 17 Mar 2020 22:32:30 +0000 (23:32 +0100)]
integer_arithmetic: detect integer arithmetic on references.

Also fixes the same for float_arithmetic.

changelog: integer_arithmetic,float_arithmetic: fix false negatives with references on integers

Fixes #5328

4 years agoMerge remote-tracking branch 'upstream/rust-1.43.0' into backport_remerge
flip1995 [Wed, 18 Mar 2020 10:54:58 +0000 (11:54 +0100)]
Merge remote-tracking branch 'upstream/rust-1.43.0' into backport_remerge