]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #5409 - dtolnay:letunit, r=flip1995
Philipp Krones [Wed, 8 Apr 2020 13:50:16 +0000 (15:50 +0200)]
Rollup merge of #5409 - dtolnay:letunit, r=flip1995

Downgrade let_unit_value to pedantic

Given that the false positive in #1502 is marked E-hard and I don't have much hope of it getting fixed, I think it would be wise to disable this lint by default. I have had to suppress this lint in every substantial codebase (\>100k line) I have worked in. Any time this lint is being triggered, it's always the false positive case.

The motivation for this lint is documented as:

> A unit value cannot usefully be used anywhere. So binding one is kind of pointless.

with this example:

> ```rust
> let x = {
>     1;
> };
> ```

Sure, but the author would find this out via an unused_variable warning or from `x` not being the type that they need further down. If there ends up being a type error on `x`, clippy's advice isn't going to help get the code compiling because it can only run if the code already compiles.

changelog: Remove let_unit_value from default set of enabled lints

4 years agoRollup merge of #5406 - flip1995:update_lints_fix, r=flip1995
Philipp Krones [Wed, 8 Apr 2020 13:50:15 +0000 (15:50 +0200)]
Rollup merge of #5406 - flip1995:update_lints_fix, r=flip1995

Fix update_lints

This fixes a bug in update_lints, where `internal` lints were not registered properly. This also cleans up some code. For example: The code generation functions no longer filter the lints the are given. This is now the task of the caller. This way, it is more obvious in the `replace_in_file` calls which lints will be included in which part of a file.

This also turns the lint modules private. There is no need for them to be public, since shared code should be in the utils module anyway.

And last but not least, this fixes the `register_lints` code generation, so also internal lints get registered.

changelog: none

4 years agoAuto merge of #5429 - faern:use-assoc-int-float-consts, r=flip1995
bors [Wed, 8 Apr 2020 13:14:50 +0000 (13:14 +0000)]
Auto merge of #5429 - faern:use-assoc-int-float-consts, r=flip1995

Use assoc int and float consts instead of module level ones

changelog: Recommend primitive type associated constants instead of module level constants

In Rust 1.43 integer and float primitive types will have a number of new associated constants. For example `MAX`, `MIN` and a number of constants related to the machine representation of floats. https://github.com/rust-lang/rust/pull/68952

These new constants are preferred over the module level constants in `{core,std}::{f*, u*, i*}`. I have in the last few days made sure that the documentation in the main rust repository uses the new constants in every place I could find (https://github.com/rust-lang/rust/pull/69860, https://github.com/rust-lang/rust/pull/70782). So the next step is naturally to make the linter recommend the new constants as well.

This PR only changes two lints. There are more. But I did not want the PR to be too big. And since I have not contributed to clippy before it felt saner to start with a small PR so I see if there are any quirks. More will come later.

4 years agoUse int assoc consts in MANUAL_SATURATING_ARITHMETIC
Linus Färnstrand [Tue, 7 Apr 2020 22:24:18 +0000 (00:24 +0200)]
Use int assoc consts in MANUAL_SATURATING_ARITHMETIC

4 years agoUse int assoc consts in checked_conversions lint
Linus Färnstrand [Tue, 7 Apr 2020 22:22:42 +0000 (00:22 +0200)]
Use int assoc consts in checked_conversions lint

4 years agoUse primitive type assoc consts in more tests
Linus Färnstrand [Tue, 7 Apr 2020 22:04:33 +0000 (00:04 +0200)]
Use primitive type assoc consts in more tests

4 years agoUse integer assoc consts in more lint example code
Linus Färnstrand [Tue, 7 Apr 2020 22:01:27 +0000 (00:01 +0200)]
Use integer assoc consts in more lint example code

4 years agoDon't import primitive type modules
Linus Färnstrand [Tue, 7 Apr 2020 21:44:24 +0000 (23:44 +0200)]
Don't import primitive type modules

4 years agoUse assoc const NAN for zero_div_zero lint
Linus Färnstrand [Tue, 7 Apr 2020 21:41:00 +0000 (23:41 +0200)]
Use assoc const NAN for zero_div_zero lint

4 years agoFix float cmp to use assoc fxx::EPSILON
Linus Färnstrand [Mon, 6 Apr 2020 21:57:57 +0000 (23:57 +0200)]
Fix float cmp to use assoc fxx::EPSILON

4 years agoFix NAN comparison lint to use assoc NAN
Linus Färnstrand [Mon, 6 Apr 2020 21:53:11 +0000 (23:53 +0200)]
Fix NAN comparison lint to use assoc NAN

4 years agoMerge pull request #5434 from eddyb/rustup
Philipp Krones [Tue, 7 Apr 2020 20:40:18 +0000 (22:40 +0200)]
Merge pull request #5434 from eddyb/rustup

rustup: update for the new Ty::walk interface.

The first commit fixes a portability bug in `setup-toolchain.sh`, while the second rewrites the handling of "trait impl methods" in `use_self` - even if `Ty::walk` could've still been used, it was IMO a misuse.

This could also serve as a PSA: *please* use `hir_ty_to_ty` instead of trying to compare `hir::Ty`s between themselves or against semantic `Ty`s. Its "quasi-deprecation" is 3 years old and doesn't really mean anything, just that it's currently uncached and that we should eventually querify it (either for a single HIR node, or for all of the nodes in an entire definition).

---

changelog: none

4 years agoFormat clippy_lints/src/let_underscore.rs
Philipp Krones [Tue, 7 Apr 2020 20:19:20 +0000 (22:19 +0200)]
Format clippy_lints/src/let_underscore.rs

4 years agorustup: update for the new Ty::walk interface.
Eduard Burtescu [Tue, 7 Apr 2020 19:53:56 +0000 (19:53 +0000)]
rustup: update for the new Ty::walk interface.

4 years agouse_self: switch to hir_ty_to_ty.
Eduard Burtescu [Tue, 7 Apr 2020 19:53:02 +0000 (19:53 +0000)]
use_self: switch to hir_ty_to_ty.

4 years agoOnly /usr/bin/env is portable in shebangs.
Eduard Burtescu [Tue, 7 Apr 2020 19:51:59 +0000 (19:51 +0000)]
Only /usr/bin/env is portable in shebangs.

4 years agoMove matches test in matches module
flip1995 [Fri, 3 Apr 2020 19:31:47 +0000 (21:31 +0200)]
Move matches test in matches module

4 years agoRun update_lints
flip1995 [Thu, 2 Apr 2020 20:08:25 +0000 (22:08 +0200)]
Run update_lints

4 years agoMake lint modules private
flip1995 [Thu, 2 Apr 2020 20:08:10 +0000 (22:08 +0200)]
Make lint modules private

4 years agoDon't filter lints in code generation functions
flip1995 [Thu, 2 Apr 2020 20:07:33 +0000 (22:07 +0200)]
Don't filter lints in code generation functions

4 years agoBuild lint lists once and the reuse them to update files
flip1995 [Thu, 2 Apr 2020 20:04:54 +0000 (22:04 +0200)]
Build lint lists once and the reuse them to update files

4 years agoGet rid of Lint::is_internal method
flip1995 [Thu, 2 Apr 2020 16:31:32 +0000 (18:31 +0200)]
Get rid of Lint::is_internal method

4 years agoClean up update_lints
flip1995 [Thu, 2 Apr 2020 16:20:23 +0000 (18:20 +0200)]
Clean up update_lints

4 years agoMerge pull request #5407 from flip1995/rustup
Manish Goregaokar [Fri, 3 Apr 2020 17:47:20 +0000 (10:47 -0700)]
Merge pull request #5407 from flip1995/rustup

Rustup to rust-lang/rust#70634

4 years agoDowngrade let_unit_value to pedantic
David Tolnay [Fri, 3 Apr 2020 01:22:18 +0000 (18:22 -0700)]
Downgrade let_unit_value to pedantic

4 years agoRustup to rust-lang/rust#70634
flip1995 [Thu, 2 Apr 2020 20:29:41 +0000 (22:29 +0200)]
Rustup to rust-lang/rust#70634

4 years agoAuto merge of #5403 - farnz:patch-1, r=flip1995
bors [Thu, 2 Apr 2020 13:39:30 +0000 (13:39 +0000)]
Auto merge of #5403 - farnz:patch-1, r=flip1995

Improve docs for option_option

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

changelog: The docs for `option_option` now suggest using a tri-state enum

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

Co-Authored-By: Philipp Krones <hello@philkrones.com>
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