]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoPR template might not be stripped by contributors
Lzu Tao [Wed, 9 Oct 2019 17:57:57 +0000 (00:57 +0700)]
PR template might not be stripped by contributors

4 years agoAuto merge of #4616 - mati865:license, r=Manishearth
bors [Wed, 9 Oct 2019 16:09:26 +0000 (16:09 +0000)]
Auto merge of #4616 - mati865:license, r=Manishearth

Fix license in Cargo.toml files

Missed in https://github.com/rust-lang/rust-clippy/pull/3269

changelog: none

r? @Manishearth

4 years agoAuto merge of #4615 - nikofil:suspicious_unary_op_formatting, r=flip1995
bors [Wed, 9 Oct 2019 15:26:33 +0000 (15:26 +0000)]
Auto merge of #4615 - nikofil:suspicious_unary_op_formatting, r=flip1995

New lint: suspicious_unary_op_formatting

fixes #4228

changelog: New lint: [`suspicious_unary_op_formatting`]

4 years agoNew lint: suspicious_unary_op_formatting
Nikos Filippakis [Thu, 3 Oct 2019 15:45:58 +0000 (17:45 +0200)]
New lint: suspicious_unary_op_formatting

Lints when, on the RHS of a BinOp, there is a UnOp without a space
before the operator but with a space after (e.g. foo >- 1).

Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
4 years agoAuto merge of #4635 - Lythenas:suggestions-for-assert-false, r=flip1995
bors [Wed, 9 Oct 2019 08:56:30 +0000 (08:56 +0000)]
Auto merge of #4635 - Lythenas:suggestions-for-assert-false, r=flip1995

Add assert message to suggestion in lint assertions_on_constants

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

- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [x] Executed `./util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `./util/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 -->

- [x] suggest replacing `assert!(false, "msg")` with `panic!("msg")`
- [x] extend to allow ~~variables~~ any expression for `"msg"`
- ~~suggest replacing `assert!(false, "msg {}", "arg")` with `panic!("msg {}", "arg")`~~

changelog: add assert message to suggestion in lint assertions_on_constants

Work towards fixing: #3575

4 years agoAuto merge of #4602 - EthanTheMaster:issue-4001, r=flip1995
bors [Tue, 8 Oct 2019 16:17:48 +0000 (16:17 +0000)]
Auto merge of #4602 - EthanTheMaster:issue-4001, r=flip1995

Add suggestion for mul_add

Issue #4001: Whenever `a*b+c` is found where `a`,`b`, and `c` are floats, a lint is suggested saying to use `a.mul_add(b, c)`. Using `mul_add` may give a performance boost depending on the target architecture and also has higher numerical accuracy as there is no round off when doing `a*b`.

changelog: New lint: `manual_mul_add`

4 years agoAddresses Issue #4001
Ethan Lam [Sat, 28 Sep 2019 18:40:10 +0000 (13:40 -0500)]
Addresses Issue #4001

Fixed typo

Fixes lint name and uses appropriate linting suggestion

changed lint help message

Added autofixable test

Added Autofixable Test

Removed Broken Autofixable File

updated lints

Generated Autofixable/Nonfixable Test Cases

Changed Suggestion Applicability

Updated Lint Count

4 years agoAuto merge of #4641 - sinkuu:revert_workaround, r=phansch
bors [Tue, 8 Oct 2019 08:36:26 +0000 (08:36 +0000)]
Auto merge of #4641 - sinkuu:revert_workaround, r=phansch

Revert "Workaround cargo bug on Windows"

[Cargo is fixed on rust master](https://github.com/rust-lang/rust/pull/65186). This reverts PR #4624.

Fixes #4638

changelog: none

4 years agoAuto merge of #4627 - kerhong:fix-typo-in-inherent-to-string, r=phansch
bors [Tue, 8 Oct 2019 07:52:44 +0000 (07:52 +0000)]
Auto merge of #4627 - kerhong:fix-typo-in-inherent-to-string, r=phansch

Fix typo in inherent_to_string documentation

A simple typo fix in `inherent_to_string` and `inherent_to_string_shadow_display` documentation

changelog: none

4 years agoAuto merge of #4611 - rust-lang:doc-visibility, r=flip1995
bors [Tue, 8 Oct 2019 07:11:26 +0000 (07:11 +0000)]
Auto merge of #4611 - rust-lang:doc-visibility, r=flip1995

account for doc visibility

This fixes #4608.

Also I noticed that the lint failed to look at trait and impl items. There's a small bit of fallout in the code, too, but not enough to warrant its own commit.

changelog: check docs of trait items and impl items, also make `missing_safety_doc` account for visibility

4 years agoAuto merge of #4595 - rust-lang:rustbot, r=flip1995
bors [Tue, 8 Oct 2019 06:30:50 +0000 (06:30 +0000)]
Auto merge of #4595 - rust-lang:rustbot, r=flip1995

Allow everyone to assign labels with rustbot

Also allows people to claim issues even if they aren't part of the org

changelog: none

4 years agoAuto merge of #4592 - rust-lang:transmute-collection, r=flip1995
bors [Tue, 8 Oct 2019 05:51:07 +0000 (05:51 +0000)]
Auto merge of #4592 - rust-lang:transmute-collection, r=flip1995

New lint: `unsound_collection_transmute`

changelog: Add `unsound_collection_transmute` lint

This fixes #4515

4 years agoRevert "Workaround cargo bug on Windows"
Shotaro Yamada [Tue, 8 Oct 2019 05:20:24 +0000 (14:20 +0900)]
Revert "Workaround cargo bug on Windows"

This reverts commit 248251b3b26c5f21e2c2f5bfa5d85cc17b13fc05.
This reverts commit 20b73514395bb442fb16ce913b6c2b3965ff3156.

4 years agoAuto merge of #4628 - flip1995:rustup, r=phansch
bors [Tue, 8 Oct 2019 05:09:53 +0000 (05:09 +0000)]
Auto merge of #4628 - flip1995:rustup, r=phansch

Rustup to rust-lang/rust#64874

TODO:
- [x] replace `rvalue_promotable_map` in [1]
- [ ] ~~fix [2] according to this comment https://github.com/rust-lang/rust/pull/64874#issuecomment-536203626 this should be merged with `consume`, but I didn't figure out how to merge them, yet.~~
- [ ] ~~fix [3]; What to do with `LoanCause`?~~

[2]+[3] probably have to be resolved by a rewrite of the lint. https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944

[1]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/methods/mod.rs#L1292-L1299

[2]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L126

[3]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L166-L176

I could need some help with [1]. The purpose of this is to "don't lint for constant values". cc @matthewjasper

For now I see what I can do with [2].

changelog: Temporary break `boxed_local` lint.

4 years agoReduce duplication
Matthias Seiffert [Mon, 7 Oct 2019 20:08:00 +0000 (22:08 +0200)]
Reduce duplication

4 years agoMatch any expr for panic message
Matthias Seiffert [Mon, 7 Oct 2019 18:40:05 +0000 (20:40 +0200)]
Match any expr for panic message

4 years agoMake if_chain more readable
Matthias Seiffert [Sun, 6 Oct 2019 18:10:30 +0000 (20:10 +0200)]
Make if_chain more readable

4 years agoAdd message to replace assert!(false) help
Matthias Seiffert [Sat, 5 Oct 2019 14:45:02 +0000 (16:45 +0200)]
Add message to replace assert!(false) help

4 years agoMove is_argument check into mutate
flip1995 [Sun, 6 Oct 2019 12:49:26 +0000 (14:49 +0200)]
Move is_argument check into mutate

4 years agoRun util/dev fmt
flip1995 [Sat, 5 Oct 2019 10:42:09 +0000 (12:42 +0200)]
Run util/dev fmt

4 years agoGet rid of rvalue_promotable_map method call
flip1995 [Sat, 5 Oct 2019 10:38:38 +0000 (12:38 +0200)]
Get rid of rvalue_promotable_map method call

4 years agoMerge consume and consume_pat in escape analysis
flip1995 [Sat, 5 Oct 2019 10:23:59 +0000 (12:23 +0200)]
Merge consume and consume_pat in escape analysis

FIXME: This doesn't work and probably needs a rewrite of the lint

See https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944

4 years agoUse new format of licenses
Mateusz Mikuła [Fri, 4 Oct 2019 15:39:23 +0000 (17:39 +0200)]
Use new format of licenses

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoFix needless_pass_by_value
flip1995 [Fri, 4 Oct 2019 13:00:01 +0000 (15:00 +0200)]
Fix needless_pass_by_value

This also accidentally improved the spans of the suggestions

4 years agoRustup to rust-lang/rust#64874
flip1995 [Fri, 4 Oct 2019 12:24:47 +0000 (14:24 +0200)]
Rustup to rust-lang/rust#64874

Episode 1 - The simple cases

4 years agoAuto merge of #4613 - Lythenas:lint-assert_eq-unit_exprs, r=flip1995
bors [Fri, 4 Oct 2019 10:27:44 +0000 (10:27 +0000)]
Auto merge of #4613 - Lythenas:lint-assert_eq-unit_exprs, r=flip1995

Add check for assert_eq macros to unit_cmp lint

changelog: Add check for unit comparisons through `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros to unit_cmp lint.

fixes #4481

4 years agoFix typo in inherent_to_string documentation
Edgars Baduns [Fri, 4 Oct 2019 09:58:53 +0000 (10:58 +0100)]
Fix typo in inherent_to_string documentation

4 years agoAuto merge of #4621 - JohnTitor:fix-windows, r=phansch
bors [Fri, 4 Oct 2019 09:35:54 +0000 (09:35 +0000)]
Auto merge of #4621 - JohnTitor:fix-windows, r=phansch

Use windows-sdk-10.1 to avoid installation failure

This fixes installation failure on Windows on Travis but we need to fix rustfmt issue first to pass the CI completely.

changelog: none

4 years agoAuto merge of #4625 - phansch:rollup-qp7ki0h, r=phansch
bors [Fri, 4 Oct 2019 06:45:04 +0000 (06:45 +0000)]
Auto merge of #4625 - phansch:rollup-qp7ki0h, r=phansch

Rollup of 2 pull requests

Successful merges:

 - #4509 (Fix false-positive of redundant_clone and move to clippy::perf)
 - #4614 (Allow casts from the result of `abs` to unsigned)

Failed merges:

changelog: none

r? @ghost

4 years agoAuto merge of #4622 - Lythenas:fix-doc-formatting-for-mistyped-literal-suffixes,...
bors [Fri, 4 Oct 2019 06:13:47 +0000 (06:13 +0000)]
Auto merge of #4622 - Lythenas:fix-doc-formatting-for-mistyped-literal-suffixes, r=phansch

Correctly align doc of mistyped literal suffixes

changelog: Fix misaligned markdown list in doc of `mistyped_literal_suffixes`

4 years agoRollup merge of #4614 - HMPerson1:abs_cast_unsigned, r=flip1995
Phil Hansch [Fri, 4 Oct 2019 06:08:59 +0000 (08:08 +0200)]
Rollup merge of #4614 - HMPerson1:abs_cast_unsigned, r=flip1995

Allow casts from the result of `abs` to unsigned

changelog: Allow casts from the result of `abs` to unsigned in `cast_sign_loss`

Fixes #4605

4 years agoRollup merge of #4509 - sinkuu:redundant_clone_fix, r=llogiq
Phil Hansch [Fri, 4 Oct 2019 06:08:58 +0000 (08:08 +0200)]
Rollup merge of #4509 - sinkuu:redundant_clone_fix, r=llogiq

Fix false-positive of redundant_clone and move to clippy::perf

This PR introduces dataflow analysis to `redundant_clone` lint to filter out borrowed variables, which had been incorrectly detected.

Depends on https://github.com/rust-lang/rust/pull/64207.

changelog: Moved `redundant_clone` lint to `perf` group

# What this lint catches

## `clone`/`to_owned`

```rust
let s = String::new();
let t = s.clone();
```

```rust
// MIR
_1 = String::new();
_2 = &_1;
_3 = clone(_2); // (*)
```

We can turn this `clone` call into a move if

1. `_2` is the sole borrow of `_1` at the statement `(*)`
2. `_1` is not used hereafter

## `Deref` + type-specific `to_owned` method

```rust
let s = std::path::PathBuf::new();
let t = s.to_path_buf();
```

```rust
// MIR
_1 = PathBuf::new();
_2 = &1;
_3 = call deref(_2);
_4 = _3;                         // Copies borrow
StorageDead(_2);
_5 = Path::to_path_buf(_4); // (*)
```

We can turn this `to_path_buf` call into a move if

1. `_3` `_4` are the sole borrow of `_1` at `(*)`
2. `_1` is not used hereafter

# What this PR introduces

1. `MaybeStorageLive` that determines whether a local lives at a particular location
2. `PossibleBorrowerVisitor` that constructs [`TransitiveRelation`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/transitive_relation/struct.TransitiveRelation.html) of possible borrows, e.g. visiting `_2 = &1; _3 = &_2:` will result in `_3 -> _2 -> _1` relation. Then `_3` and `_2` will be counted as possible borrowers of `_1` in the sole-borrow analysis above.

4 years agoAuto merge of #4624 - sinkuu:workaround_cargo, r=llogiq
bors [Fri, 4 Oct 2019 05:42:25 +0000 (05:42 +0000)]
Auto merge of #4624 - sinkuu:workaround_cargo, r=llogiq

Workaround cargo issue on appveyor

Use absolute paths for `cargo` and `rustfmt` to workaround https://github.com/rust-lang/cargo/issues/7475.

Appveyor passed on my fork: https://ci.appveyor.com/project/sinkuu/rust-clippy/builds/27870367

changelog: none

4 years agoUse home::cargo_home
Shotaro Yamada [Fri, 4 Oct 2019 02:05:44 +0000 (11:05 +0900)]
Use home::cargo_home

4 years agoWorkaround cargo bug on Windows
Shotaro Yamada [Fri, 4 Oct 2019 00:56:45 +0000 (09:56 +0900)]
Workaround cargo bug on Windows

4 years agoCorrectly align doc of mistyped literal suffixes
Matthias Seiffert [Thu, 3 Oct 2019 20:07:51 +0000 (22:07 +0200)]
Correctly align doc of mistyped literal suffixes

4 years agoUse windows-sdk-10.1 to avoid installation failure
Yuki Okushi [Thu, 3 Oct 2019 19:42:46 +0000 (04:42 +0900)]
Use windows-sdk-10.1 to avoid installation failure

4 years agoFix license in Cargo.toml files
Mateusz Mikuła [Thu, 3 Oct 2019 17:55:05 +0000 (19:55 +0200)]
Fix license in Cargo.toml files

4 years agoRemove assert_ne example from doc
Matthias Seiffert [Thu, 3 Oct 2019 17:53:41 +0000 (19:53 +0200)]
Remove assert_ne example from doc

4 years agoUpdate unit_cmp tests to include blocks for asserts
Matthias Seiffert [Thu, 3 Oct 2019 12:38:04 +0000 (14:38 +0200)]
Update unit_cmp tests to include blocks for asserts

4 years agoMention asserts in doc for unit_cmp lint
Matthias Seiffert [Thu, 3 Oct 2019 12:35:05 +0000 (14:35 +0200)]
Mention asserts in doc for unit_cmp lint

4 years agoUpdate the .stderr to include the backticks
Matthias Seiffert [Thu, 3 Oct 2019 10:01:02 +0000 (12:01 +0200)]
Update the .stderr to include the backticks

4 years agoPrint assert macro name in backticks
Matthias Seiffert [Thu, 3 Oct 2019 09:43:39 +0000 (11:43 +0200)]
Print assert macro name in backticks

Co-Authored-By: Philipp Krones <hello@philkrones.com>
4 years agoextern rustc_index
Shotaro Yamada [Tue, 1 Oct 2019 23:02:18 +0000 (08:02 +0900)]
extern rustc_index

4 years agoAdd comments
Shotaro Yamada [Mon, 30 Sep 2019 07:16:09 +0000 (16:16 +0900)]
Add comments

4 years agoResolve reviews
Shotaro Yamada [Sat, 28 Sep 2019 11:29:35 +0000 (20:29 +0900)]
Resolve reviews

4 years agoApply suggestion
Shotaro Yamada [Wed, 18 Sep 2019 05:56:30 +0000 (14:56 +0900)]
Apply suggestion

Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com>
4 years agoTest fixes
Shotaro Yamada [Mon, 16 Sep 2019 15:50:36 +0000 (00:50 +0900)]
Test fixes

4 years agoAdd run-rustfix
Shotaro Yamada [Tue, 10 Sep 2019 02:56:34 +0000 (11:56 +0900)]
Add run-rustfix

4 years agoFix false-positive of redundant_clone and move to clippy::perf
Shotaro Yamada [Mon, 16 Sep 2019 15:50:15 +0000 (00:50 +0900)]
Fix false-positive of redundant_clone and move to clippy::perf

4 years agoAllow casts from the result of `abs` to unsigned
HMPerson1 [Wed, 2 Oct 2019 21:23:54 +0000 (17:23 -0400)]
Allow casts from the result of `abs` to unsigned

4 years agoAdd check for assert_eq macros to unit_cmp lint
Matthias Seiffert [Wed, 2 Oct 2019 20:48:19 +0000 (22:48 +0200)]
Add check for assert_eq macros to unit_cmp lint

4 years agoNew lint: unsound_collection_transmute
Andre Bogus [Fri, 27 Sep 2019 17:19:26 +0000 (19:19 +0200)]
New lint: unsound_collection_transmute

4 years agoaccount for doc visibility
Andre Bogus [Wed, 2 Oct 2019 15:19:30 +0000 (17:19 +0200)]
account for doc visibility

4 years agoAuto merge of #4599 - lzutao:zero-ptr-suggestion, r=flip1995
bors [Wed, 2 Oct 2019 17:16:29 +0000 (17:16 +0000)]
Auto merge of #4599 - lzutao:zero-ptr-suggestion, r=flip1995

Add suggestion for zero-ptr lint

changelog: Improve suggestion of `zero_ptr` lint

4 years agoAuto merge of #4603 - rust-lang:needless-doc-main, r=flip1995
bors [Wed, 2 Oct 2019 15:51:58 +0000 (15:51 +0000)]
Auto merge of #4603 - rust-lang:needless-doc-main, r=flip1995

New lint: needless_doc_main

changelog: Add `needless_doc_main` lint

4 years agoAdd suggestion for zero-ptr lint
Lzu Tao [Wed, 2 Oct 2019 15:38:00 +0000 (22:38 +0700)]
Add suggestion for zero-ptr lint

4 years agoNew lint: needless_doc_main
Andre Bogus [Mon, 30 Sep 2019 22:10:24 +0000 (00:10 +0200)]
New lint: needless_doc_main

4 years agoAuto merge of #4590 - flip1995:ice_4579, r=Manishearth
bors [Wed, 2 Oct 2019 08:56:56 +0000 (08:56 +0000)]
Auto merge of #4590 - flip1995:ice_4579, r=Manishearth

Fix ICE #4579

Fixes #4579
Fixes #4584

r? @phansch

changelog: Fix ICE caused by Clippys const-utils

4 years agoDisable hyper and futures-rs integration tests
flip1995 [Wed, 2 Oct 2019 08:55:52 +0000 (10:55 +0200)]
Disable hyper and futures-rs integration tests

4 years agoFix ICE #4579
flip1995 [Fri, 27 Sep 2019 13:36:56 +0000 (15:36 +0200)]
Fix ICE #4579

4 years agoAdd regression test for ICE #4579
flip1995 [Fri, 27 Sep 2019 13:36:20 +0000 (15:36 +0200)]
Add regression test for ICE #4579

4 years agoMerge pull request #4606 from Manishearth/rustup
Manish Goregaokar [Wed, 2 Oct 2019 00:53:14 +0000 (17:53 -0700)]
Merge pull request #4606 from Manishearth/rustup

Fix some tests

4 years agoRemove tests that only ICE on CI
Manish Goregaokar [Tue, 1 Oct 2019 23:45:07 +0000 (16:45 -0700)]
Remove tests that only ICE on CI

4 years agoAllow const_err in out_of_bounds_indexing tests
Manish Goregaokar [Tue, 1 Oct 2019 23:37:22 +0000 (16:37 -0700)]
Allow const_err in out_of_bounds_indexing tests

4 years agoMerge pull request #4604 from Manishearth/rustup
Manish Goregaokar [Tue, 1 Oct 2019 18:30:22 +0000 (11:30 -0700)]
Merge pull request #4604 from Manishearth/rustup

Rustup to rustc 1.40.0-nightly (702b45e40 2019-10-01)

4 years agoUse new spans for expansion checking in loop lints
Manish Goregaokar [Tue, 1 Oct 2019 17:14:15 +0000 (10:14 -0700)]
Use new spans for expansion checking in loop lints

4 years agoAuto merge of #4601 - lzutao:clean-up-unused-vars, r=phansch
bors [Sun, 29 Sep 2019 17:05:36 +0000 (17:05 +0000)]
Auto merge of #4601 - lzutao:clean-up-unused-vars, r=phansch

Clean up some unused vars

changelog: none

4 years agoClean up some unused vars
Lzu Tao [Sun, 29 Sep 2019 16:40:38 +0000 (23:40 +0700)]
Clean up some unused vars

4 years agoAuto merge of #4600 - lzutao:rustup-63492, r=oli-obk
bors [Sun, 29 Sep 2019 16:06:56 +0000 (16:06 +0000)]
Auto merge of #4600 - lzutao:rustup-63492, r=oli-obk

Rustup rust-lang/rust#63492

changelog: none

4 years agoRustup rust-lang/rust#63492
Lzu Tao [Sun, 29 Sep 2019 15:58:17 +0000 (22:58 +0700)]
Rustup rust-lang/rust#63492

4 years agoAuto merge of #4593 - james9909:fix-multiple-inherent-impls, r=llogiq
bors [Sun, 29 Sep 2019 06:21:55 +0000 (06:21 +0000)]
Auto merge of #4593 - james9909:fix-multiple-inherent-impls, r=llogiq

Fix false positive in `multiple_inherent_impl`

changelog: Fix false positive in `multiple_inherent_impl` by ignoring impls derived from macros.

Closes #4578.

4 years agoAllow everyone to assign labels with rustbot
Oliver Scherer [Sat, 28 Sep 2019 12:14:20 +0000 (14:14 +0200)]
Allow everyone to assign labels with rustbot

4 years agoAuto merge of #4594 - matthiaskrgr:rustup_18, r=phansch
bors [Sat, 28 Sep 2019 09:51:08 +0000 (09:51 +0000)]
Auto merge of #4594 - matthiaskrgr:rustup_18, r=phansch

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

cc https://github.com/rust-lang/rust/issues/64867

changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/64781/
Matthias Krüger [Sat, 28 Sep 2019 08:42:41 +0000 (10:42 +0200)]
rustup https://github.com/rust-lang/rust/pull/64781/

cc https://github.com/rust-lang/rust/issues/64867

4 years agoIgnore impls derived from macros
James Wang [Sat, 28 Sep 2019 01:46:55 +0000 (20:46 -0500)]
Ignore impls derived from macros

4 years agoAuto merge of #4591 - flip1995:rustup, r=flip1995
bors [Fri, 27 Sep 2019 16:19:14 +0000 (16:19 +0000)]
Auto merge of #4591 - flip1995:rustup, r=flip1995

Rustup to rust-lang/rust#64813

cc rust-lang/rust#64843

changelog: none

4 years agoRemove clippy::author attribute from trailing_zeroes test
flip1995 [Fri, 27 Sep 2019 16:10:18 +0000 (18:10 +0200)]
Remove clippy::author attribute from trailing_zeroes test

4 years agoMove author issue test to author subdir
flip1995 [Fri, 27 Sep 2019 16:07:07 +0000 (18:07 +0200)]
Move author issue test to author subdir

4 years agoFix author lint
flip1995 [Fri, 27 Sep 2019 16:01:04 +0000 (18:01 +0200)]
Fix author lint

4 years agoRustup to rust-lang/rust#64813
flip1995 [Fri, 27 Sep 2019 15:16:06 +0000 (17:16 +0200)]
Rustup to rust-lang/rust#64813

4 years agoAuto merge of #4589 - mikerite:booleans-refactor-20190925, r=phansch
bors [Fri, 27 Sep 2019 06:16:55 +0000 (06:16 +0000)]
Auto merge of #4589 - mikerite:booleans-refactor-20190925, r=phansch

Refactor `booleans`

Remove unused output from `suggest(..)`

changelog: none

4 years agoRefactor `booleans`
Michael Wright [Fri, 27 Sep 2019 05:59:34 +0000 (07:59 +0200)]
Refactor `booleans`

Remove unused output from `suggest(..)`

4 years agoAuto merge of #4585 - michaelsproul:arith-assign-op, r=llogiq
bors [Fri, 27 Sep 2019 04:46:06 +0000 (04:46 +0000)]
Auto merge of #4585 - michaelsproul:arith-assign-op, r=llogiq

Detect mutating arithmetic in integer_arithmetic restriction lint

changelog: detect mutating arithmetic (like +=) in `integer_arithmetic` restriction lint

4 years agoDetect assignment ops in integer_arithmetic
Michael Sproul [Thu, 26 Sep 2019 07:47:06 +0000 (17:47 +1000)]
Detect assignment ops in integer_arithmetic

4 years agoAuto merge of #4582 - matthiaskrgr:rustup_17, r=Manishearth
bors [Thu, 26 Sep 2019 17:32:24 +0000 (17:32 +0000)]
Auto merge of #4582 - matthiaskrgr:rustup_17, r=Manishearth

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

changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/64515
Matthias Krüger [Thu, 26 Sep 2019 16:34:43 +0000 (18:34 +0200)]
rustup https://github.com/rust-lang/rust/pull/64515

changelog: none

4 years agoAuto merge of #4581 - Manishearth:osx-enable, r=matthiaskrgr
bors [Thu, 26 Sep 2019 10:33:44 +0000 (10:33 +0000)]
Auto merge of #4581 - Manishearth:osx-enable, r=matthiaskrgr

Re enable OSX builders

Fixes #4576

changelog: none

4 years agoRe enable OSX builders
Manish Goregaokar [Thu, 26 Sep 2019 10:31:06 +0000 (03:31 -0700)]
Re enable OSX builders

Fixes #4576

4 years agoAuto merge of #4580 - lzutao:rustup, r=flip1995
bors [Thu, 26 Sep 2019 09:13:59 +0000 (09:13 +0000)]
Auto merge of #4580 - lzutao:rustup, r=flip1995

Rustup rust-lang/rust#64513

changelog: none

4 years agoRemove unused import
Lzu Tao [Thu, 26 Sep 2019 09:04:45 +0000 (16:04 +0700)]
Remove unused import

4 years agoRustup https://github.com/rust-lang/rust/pull/64513
Lzu Tao [Thu, 26 Sep 2019 09:03:36 +0000 (16:03 +0700)]
Rustup https://github.com/rust-lang/rust/pull/64513

4 years agoAuto merge of #4568 - mikerite:fix-4548, r=flip1995
bors [Thu, 26 Sep 2019 08:06:16 +0000 (08:06 +0000)]
Auto merge of #4568 - mikerite:fix-4548, r=flip1995

Fix `nonminimal-bool` false positive

Closes #4548
Closes #3847

changelog: Fix `nonminimal-bool` false positive

4 years agoAuto merge of #4569 - james9909:add-comparison-chain, r=oli-obk
bors [Thu, 26 Sep 2019 07:38:08 +0000 (07:38 +0000)]
Auto merge of #4569 - james9909:add-comparison-chain, r=oli-obk

Add a new lint for comparison chains

changelog: Adds a new lint: `comparison_chain`.

`comparison_chain` lints all `if` conditional chains where all the conditions are binary comparisons on the same two operands and will suggest a rewrite with `match`.

Closes #4531.

4 years agoAuto merge of #4570 - lzutao:call_site_toplevel_ref_arg, r=phansch
bors [Thu, 26 Sep 2019 06:02:21 +0000 (06:02 +0000)]
Auto merge of #4570 - lzutao:call_site_toplevel_ref_arg, r=phansch

Fix macro expansion in toplevel_ref_arg lint

changelog: Fix macro expansion in toplevel_ref_arg lint

4 years agoRemove unused attribute in test
Lzu Tao [Thu, 26 Sep 2019 01:53:39 +0000 (01:53 +0000)]
Remove unused attribute in test

4 years agoFix macro expansion in toplevel_ref_arg lint
Lzu Tao [Thu, 26 Sep 2019 01:46:51 +0000 (08:46 +0700)]
Fix macro expansion in toplevel_ref_arg lint

4 years agoAdd regression test for macro expansion
Lzu Tao [Wed, 25 Sep 2019 04:06:52 +0000 (11:06 +0700)]
Add regression test for macro expansion

4 years agoAuto merge of #4575 - Manishearth:suggestions, r=oli-obk
bors [Wed, 25 Sep 2019 21:54:14 +0000 (21:54 +0000)]
Auto merge of #4575 - Manishearth:suggestions, r=oli-obk

Make more tests rustfixable

Fixes https://github.com/rust-lang/rust-clippy/issues/3630

changelog: Improve suggestions for many lints in preparation for `cargo fix --clippy`

r? @phansch @yaahc

4 years agoDowngrade op_ref to a MaybeIncorrect suggestion
Manish Goregaokar [Wed, 25 Sep 2019 21:53:20 +0000 (14:53 -0700)]
Downgrade op_ref to a MaybeIncorrect suggestion