]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #4561 - rust-lang:let-return-fix, r=phansch
bors [Mon, 23 Sep 2019 08:25:38 +0000 (08:25 +0000)]
Auto merge of #4561 - rust-lang:let-return-fix, r=phansch

Fix let_and_return lint

This fixes #4555 (false positive for the `let_and_return` lint).

changelog: none

4 years agoFix let_and_return lint
Andre Bogus [Fri, 20 Sep 2019 16:20:49 +0000 (18:20 +0200)]
Fix let_and_return lint

4 years agoAuto merge of #4566 - phansch:update_changelog2, r=flip1995
bors [Mon, 23 Sep 2019 07:11:21 +0000 (07:11 +0000)]
Auto merge of #4566 - phansch:update_changelog2, r=flip1995

Update the changelog for Rust 1.38

[Rendered](https://github.com/phansch/rust-clippy/blob/update_changelog2/CHANGELOG.md#rust-138)

changelog: none

4 years agoAuto merge of #4537 - mikerite:unneeded_wildcard_pattern, r=phansch
bors [Mon, 23 Sep 2019 05:51:04 +0000 (05:51 +0000)]
Auto merge of #4537 - mikerite:unneeded_wildcard_pattern, r=phansch

Add `unneeded-wildcard-pattern` lint

changelog: Add `unneeded-wildcard-pattern` lint

4 years agoMerge branch 'master' into unneeded_wildcard_pattern
Michael Wright [Mon, 23 Sep 2019 03:26:47 +0000 (05:26 +0200)]
Merge branch 'master' into unneeded_wildcard_pattern

4 years agoUpdate the changelog for Rust 1.38
Philipp Hansch [Sun, 22 Sep 2019 17:12:42 +0000 (19:12 +0200)]
Update the changelog for Rust 1.38

4 years agoAuto merge of #4518 - imp:4517_license-file, r=phansch
bors [Sun, 22 Sep 2019 11:40:35 +0000 (11:40 +0000)]
Auto merge of #4518 - imp:4517_license-file, r=phansch

clippy::cargo_common_metadata: check for license-file

When license property is missing in Cargo.toml check for license-file
as it may be used instead of the former. The check implemented here is
very naive as it only verifies that the field is present and is not
empty. More scrutiny can be applied by verifying the file is actually
present.

Fixes #4517

changelog: clippy::cargo_common_metadata now checks for license-file when license is missing

4 years agoAuto merge of #4565 - matthiaskrgr:rustup_16, r=phansch
bors [Sun, 22 Sep 2019 10:36:32 +0000 (10:36 +0000)]
Auto merge of #4565 - matthiaskrgr:rustup_16, r=phansch

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

changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/64666
Matthias Krüger [Sun, 22 Sep 2019 10:35:20 +0000 (12:35 +0200)]
rustup https://github.com/rust-lang/rust/pull/64666

4 years agoclippy::cargo_common_metadata: check for license-file
Cyril Plisko [Sat, 7 Sep 2019 08:00:02 +0000 (11:00 +0300)]
clippy::cargo_common_metadata: check for license-file

When license property is missing in Cargo.toml check for license-file
as it may be used instead of the former. The check implemented here is
very naive as it only verifies that the field is present and is not
empty. More scrutiny can be applied by verifying the file is actually
present.

Fixes #4517

4 years agoAdd additional tests to unneeded_wildcard_pattern
Michael Wright [Sun, 22 Sep 2019 07:10:39 +0000 (09:10 +0200)]
Add additional tests to unneeded_wildcard_pattern

4 years agoMerge branch 'master' into unneeded_wildcard_pattern
Michael Wright [Sun, 22 Sep 2019 06:59:23 +0000 (08:59 +0200)]
Merge branch 'master' into unneeded_wildcard_pattern

4 years agoAuto merge of #4562 - phansch:wildcard_enum_match_rustfix, r=llogiq
bors [Sat, 21 Sep 2019 11:42:15 +0000 (11:42 +0000)]
Auto merge of #4562 - phansch:wildcard_enum_match_rustfix, r=llogiq

Add run-rustfix for wildcard_enum_match_arm lint

changelog: none

cc #3630

4 years agoAdd run-rustfix for wildcard_enum_match_arm lint
Philipp Hansch [Sat, 21 Sep 2019 05:26:18 +0000 (07:26 +0200)]
Add run-rustfix for wildcard_enum_match_arm lint

4 years agoAuto merge of #4558 - Manishearth:suggestions, r=phansch
bors [Sat, 21 Sep 2019 01:01:21 +0000 (01:01 +0000)]
Auto merge of #4558 - Manishearth:suggestions, r=phansch

Make more tests rustfixable

changelog: Fix various lint suggestions

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

r? @phansch

4 years agoinline_fn_without_body: make it use a rustfix page
Manish Goregaokar [Fri, 20 Sep 2019 07:40:20 +0000 (16:40 +0900)]
inline_fn_without_body: make it use a rustfix page

4 years agoimplicit_return: make it use a rustfix test
Manish Goregaokar [Fri, 20 Sep 2019 07:07:13 +0000 (16:07 +0900)]
implicit_return: make it use a rustfix test

4 years agoidentity_conversion: make it use a rustfix test
Manish Goregaokar [Fri, 20 Sep 2019 06:53:58 +0000 (15:53 +0900)]
identity_conversion: make it use a rustfix test

4 years agofor_loop: Split test into fixable/unfixable, make needless_range_loop use updated...
Manish Goregaokar [Fri, 20 Sep 2019 06:25:05 +0000 (15:25 +0900)]
for_loop: Split test into fixable/unfixable, make needless_range_loop use updated range syntax

4 years agoeq_op: stop testing nonminimal_bool in same file
Manish Goregaokar [Fri, 20 Sep 2019 06:16:33 +0000 (15:16 +0900)]
eq_op: stop testing nonminimal_bool in same file

4 years agoop_ref: Move tests out of eq_op file
Manish Goregaokar [Fri, 20 Sep 2019 05:54:16 +0000 (14:54 +0900)]
op_ref: Move tests out of eq_op file

4 years agoAuto merge of #4511 - rust-lang:replace_uninitialized, r=flip1995
bors [Fri, 20 Sep 2019 07:27:36 +0000 (07:27 +0000)]
Auto merge of #4511 - rust-lang:replace_uninitialized, r=flip1995

New lint: mem_replace_with_uninit

changelog: add `mem_replace_uninit` lint

This fixes #4485

4 years agoderef_addrof_double_trigger: Note why rustfix can't be used
Manish Goregaokar [Thu, 19 Sep 2019 21:57:15 +0000 (06:57 +0900)]
deref_addrof_double_trigger: Note why rustfix can't be used

4 years agoassign_ops: Remove MachineApplicable
Manish Goregaokar [Thu, 19 Sep 2019 21:48:39 +0000 (06:48 +0900)]
assign_ops: Remove MachineApplicable

4 years agonew lint: mem-replace-with-uninit
Andre Bogus [Fri, 13 Sep 2019 16:39:14 +0000 (18:39 +0200)]
new lint: mem-replace-with-uninit

4 years agoAuto merge of #4544 - JoshMcguigan:issue-4542, r=flip1995
bors [Thu, 19 Sep 2019 09:28:29 +0000 (09:28 +0000)]
Auto merge of #4544 - JoshMcguigan:issue-4542, r=flip1995

#4542 remove machine applicable suggestion

This helps #4542 (but does not completely resolve) by removing the machine applicable suggestion (which was incorrect) for that case.

I would have preferred to fix the machine applicable suggestion to handle format strings, but that's a bit beyond my current understanding of the clippy codebase. I'd be happy to give it a try given some guidance.

changelog: only produce machine applicable suggestions on `explicit_write` lint

4 years agoAuto merge of #4539 - jolson88:cast-lossless-pedantic, r=flip1995
bors [Thu, 19 Sep 2019 08:50:31 +0000 (08:50 +0000)]
Auto merge of #4539 - jolson88:cast-lossless-pedantic, r=flip1995

Changes cast-lossless to a pedantic lint

As discussed in #4528, this moves the cast-lossless lint from `all` to `pedantic`.

I couldn't tell from description alone if it should also be removed from the complexity category, so I left it as part of complexity for now. I didn't see any impact to the tests from this change, but I could be wrong (as this is my first PR).

fixes #4528

changelog: Moves cast-lossless from default to checking only as a `pedantic` lint.

4 years agoAuto merge of #4535 - rust-lang:unsafe-doc, r=flip1995
bors [Thu, 19 Sep 2019 08:21:42 +0000 (08:21 +0000)]
Auto merge of #4535 - rust-lang:unsafe-doc, r=flip1995

New lint: Require `# Safety` section in pub unsafe fn docs

changelog: add `missing_safety_doc` lint

This fixes #2207

4 years agoNew lint: Require `# Safety` section in pub unsafe fn docs
Andre Bogus [Wed, 11 Sep 2019 16:39:02 +0000 (18:39 +0200)]
New lint: Require `# Safety` section in pub unsafe fn docs

4 years agoAuto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq
bors [Thu, 19 Sep 2019 04:12:43 +0000 (04:12 +0000)]
Auto merge of #4551 - mikerite:fix-ice-reporting, r=llogiq

Fix ice reporting

changelog: none

4 years agoWork around qpath_res issue
Michael Wright [Wed, 18 Sep 2019 17:29:04 +0000 (19:29 +0200)]
Work around qpath_res issue

4 years agoremove machine applicable suggestion explicit_write format #4542
Josh Mcguigan [Sun, 15 Sep 2019 17:33:20 +0000 (10:33 -0700)]
remove machine applicable suggestion explicit_write format #4542

4 years agoAdd note about refactoring
mikerite [Wed, 18 Sep 2019 04:48:47 +0000 (06:48 +0200)]
Add note about refactoring

Co-Authored-By: Philipp Krones <hello@philkrones.com>
4 years agoAdd ICE regression test
flip1995 [Tue, 17 Sep 2019 07:48:25 +0000 (09:48 +0200)]
Add ICE regression test

4 years agoChanges to catch_fatal_errors in rustc driver
Jason Olson [Sun, 15 Sep 2019 18:07:44 +0000 (11:07 -0700)]
Changes to catch_fatal_errors in rustc driver

A [recent PR](https://github.com/rust-lang/rust/pull/60584/files#diff-707a0eda6b2f1a0537abc3d23133748cL1151)
changed the function name from `report_ices_to_stderr_if_any` to `catch_fatal_errors`. This PR changes to using
the new function name.

4 years agoChanges cast-lossless to a pedantic lint
Jason Olson [Fri, 13 Sep 2019 00:30:58 +0000 (17:30 -0700)]
Changes cast-lossless to a pedantic lint

Fixes #4528

4 years agoAuto merge of #4513 - matthiaskrgr:dogdood_incrcomp, r=llogiq
bors [Sat, 14 Sep 2019 16:02:59 +0000 (16:02 +0000)]
Auto merge of #4513 - matthiaskrgr:dogdood_incrcomp, r=llogiq

tests: disable incremental compilation in dogfood to reduce target dir size

tests: execute dogfood tests with incremental compilation disabled reduces target/ dir size of when "cargo test"ing by around 2 gigs.

changelog: none

4 years agoAuto merge of #4540 - jolson88:fix-place-projection, r=phansch
bors [Sat, 14 Sep 2019 06:12:52 +0000 (06:12 +0000)]
Auto merge of #4540 - jolson88:fix-place-projection, r=phansch

Fix rustc breaking change: convert to Place's new boxed slice projection

Addressed breaking changes from rust-lang PR https://github.com/rust-lang/rust/pull/63420/

I'm not entirely sure the semantics are preserved as I don't have much knowledge about MIR yet. So this code was largely reverse-engineered from the PR above. I wouldn't be surprised if I did something wrong :).

I followed the instructions to pull latest rustc from master and verified the build break I was seeing in my PR for cast-lossless in Travis CI. With these changes, it compiles again and all tests pass.

Fixes https://github.com/rust-lang/rust/issues/64440

changelog: none

4 years agoConvert to Place's new boxed slice projection
Jason Olson [Sat, 14 Sep 2019 01:49:11 +0000 (18:49 -0700)]
Convert to Place's new boxed slice projection

Fixes breaking change from rust-lang PR https://github.com/rust-lang/rust/pull/63420/

4 years agoApply review suggestions
Michael Wright [Fri, 13 Sep 2019 06:20:27 +0000 (08:20 +0200)]
Apply review suggestions

Fix grammar errors and use `Pat::is_rest` instead of own function.

4 years agoAuto merge of #4536 - matthiaskrgr:impl_lint_doc, r=flip1995
bors [Thu, 12 Sep 2019 08:10:43 +0000 (08:10 +0000)]
Auto merge of #4536 - matthiaskrgr:impl_lint_doc, r=flip1995

docs: fix broken link in adding_lints documantation

changelog: none

4 years agoAuto merge of #4538 - mikerite:fix-3567, r=flip1995
bors [Thu, 12 Sep 2019 07:42:38 +0000 (07:42 +0000)]
Auto merge of #4538 - mikerite:fix-3567, r=flip1995

Verify that issue #3567 is resolved

Closes #3567

changelog: none

4 years agoVerify that issue #3567 is resolved
Michael Wright [Thu, 12 Sep 2019 06:47:11 +0000 (08:47 +0200)]
Verify that issue #3567 is resolved

Closes #3567

4 years agoFix lint warnings
Michael Wright [Thu, 12 Sep 2019 06:36:05 +0000 (08:36 +0200)]
Fix lint warnings

4 years agoAdd `unneeded-wildcard-pattern` lint
Michael Wright [Thu, 12 Sep 2019 06:25:05 +0000 (08:25 +0200)]
Add `unneeded-wildcard-pattern` lint

4 years agodocs: fix broken link in adding_lints documantation
Matthias Krüger [Wed, 11 Sep 2019 19:53:12 +0000 (21:53 +0200)]
docs: fix broken link in adding_lints documantation

4 years agotests: dogfood: run tests with debuginfo=0 reducing dogfood target dir size even...
Matthias Krüger [Wed, 11 Sep 2019 18:52:36 +0000 (20:52 +0200)]
tests: dogfood: run tests with debuginfo=0 reducing dogfood target dir size even further.

4 years agotests: execute dogfood tests with incremental compilation disabled
Matthias Krüger [Fri, 6 Sep 2019 17:35:20 +0000 (19:35 +0200)]
tests: execute dogfood tests with incremental compilation disabled

reduces target/ dir size of when "cago test"ing by around 2 gigs.

4 years agoAuto merge of #4478 - tsurai:master, r=flip1995
bors [Wed, 11 Sep 2019 09:48:25 +0000 (09:48 +0000)]
Auto merge of #4478 - tsurai:master, r=flip1995

Fix incorrect swap suggestion

Clippy suggests using swap on fields belonging to the same owner causing two mutable borrows of the owner.

Disclosure: This is my first time working with clippy and rusts HIR. I'm very grateful for assistance and suggestions to improve the PR.

fixes #981
changelog: Fix false positive in `manual_swap` lint

4 years agoAuto merge of #4534 - matthiaskrgr:fmt_, r=flip1995
bors [Wed, 11 Sep 2019 07:14:31 +0000 (07:14 +0000)]
Auto merge of #4534 - matthiaskrgr:fmt_, r=flip1995

run rustfmt

I was getting local `cargo test` failures because of this, yet travis was green.

changelog: none

4 years agorun rustfmt
Matthias Krüger [Wed, 11 Sep 2019 06:26:57 +0000 (08:26 +0200)]
run rustfmt

4 years agoAuto merge of #4532 - rust-lang:integer-const, r=oli-obk
bors [Tue, 10 Sep 2019 19:40:45 +0000 (19:40 +0000)]
Auto merge of #4532 - rust-lang:integer-const, r=oli-obk

New `is_integer_const` to check more const ints

This mostly affects loop checks and the modulo_one lint. Tests were also updated where applicable.

changelog: none

4 years agoNew `is_integer_const` to check more const ints
Andre Bogus [Mon, 9 Sep 2019 15:01:01 +0000 (17:01 +0200)]
New `is_integer_const` to check more const ints

This mostly affects loop checks and the modulo_one lint. Tests
were also updated where applicable.

4 years agoAuto merge of #4525 - mikerite:use-self-constructor, r=phansch
bors [Tue, 10 Sep 2019 07:32:11 +0000 (07:32 +0000)]
Auto merge of #4525 - mikerite:use-self-constructor, r=phansch

Extend `use_self` to check constructor

Rust did not allow this before.

changelog: Extend `use_self` to check constructor

4 years agoAuto merge of #4529 - lzutao:rm-feature-bind-by-move, r=matthiaskrgr
bors [Tue, 10 Sep 2019 04:04:42 +0000 (04:04 +0000)]
Auto merge of #4529 - lzutao:rm-feature-bind-by-move, r=matthiaskrgr

Remove feature gate bind-by-move

This feature was stabilized in https://github.com/rust-lang/rust/pull/63118
changelog: none

4 years agoRemove feature gate bind-by-move
Lzu Tao [Tue, 10 Sep 2019 02:23:25 +0000 (09:23 +0700)]
Remove feature gate bind-by-move

4 years agoAuto merge of #4527 - rust-lang:more-vec-diag-items, r=oli-obk
bors [Mon, 9 Sep 2019 16:56:51 +0000 (16:56 +0000)]
Auto merge of #4527 - rust-lang:more-vec-diag-items, r=oli-obk

Changed more `Vec` paths to diagnostic_items

In #4519, I missed a few instances of path matching for `Vec`, so here they are.

r? @oli-obk

changelog: none

4 years agoAuto merge of #4522 - mikerite:fix-4514, r=phansch
bors [Mon, 9 Sep 2019 15:38:59 +0000 (15:38 +0000)]
Auto merge of #4522 - mikerite:fix-4514, r=phansch

Fix `or_fun_call` bad suggestion

Closes #4514

changelog: Fix `or_fun_call` bad suggestion

4 years agoChanged more Vec paths to diagnostic_items
Andre Bogus [Mon, 9 Sep 2019 15:22:41 +0000 (17:22 +0200)]
Changed more Vec paths to diagnostic_items

4 years agoAuto merge of #4458 - flip1995:block_in_if_ext_macro, r=phansch
bors [Mon, 9 Sep 2019 14:55:33 +0000 (14:55 +0000)]
Auto merge of #4458 - flip1995:block_in_if_ext_macro, r=phansch

Allow block_in_if_{stmt,expr} in external macro

I found this by running `cargo fix --clippy` on quite a big codebase.

You could refactor this assert to
```rust
let block_expr = _;
assert!(block_expr);
```

but,
1. it doesn't increase the readability IMO
2. That isn't possible in a `debug_assert!`

I'm not sure though, if we should allow this for macros in general or just for external macros.

changelog: Allow `block_in_if_{stmt,expr}` in external macros

4 years agoAuto merge of #4510 - lzutao:unsep-literals-regression-macro-attr, r=flip1995
bors [Mon, 9 Sep 2019 14:13:55 +0000 (14:13 +0000)]
Auto merge of #4510 - lzutao:unsep-literals-regression-macro-attr, r=flip1995

Fix regression in case of proc-macro attribute expansion

cc  #4507
changelog: none
r? @flip1995

4 years agoAdd a regression test for proc-macro attribute
Lzu Tao [Sat, 7 Sep 2019 03:53:34 +0000 (10:53 +0700)]
Add a regression test for proc-macro attribute

4 years agoFix regression in case of proc-macro attribute expansion
Lzu Tao [Fri, 6 Sep 2019 10:00:53 +0000 (17:00 +0700)]
Fix regression in case of proc-macro attribute expansion

4 years agoExtend `use_self` to check constructor
Michael Wright [Mon, 9 Sep 2019 05:51:44 +0000 (07:51 +0200)]
Extend `use_self` to check constructor

Rust did not allow this before.

4 years agoMerge branch 'master' into fix-4514
Michael Wright [Mon, 9 Sep 2019 05:36:30 +0000 (07:36 +0200)]
Merge branch 'master' into fix-4514

4 years agoAuto merge of #4519 - rust-lang:vec-diagnostic-item, r=@oli-obk
bors [Mon, 9 Sep 2019 04:52:29 +0000 (04:52 +0000)]
Auto merge of #4519 - rust-lang:vec-diagnostic-item, r=@oli-obk

Use diagnostic item for `Vec`

This adds a new `is_type_diagnostic_item` to check items without lookup via `match_type`.

changelog: none

4 years agoUse diagnostic item for
Andre Bogus [Sat, 7 Sep 2019 10:21:52 +0000 (12:21 +0200)]
Use diagnostic item for

4 years agoAuto merge of #4523 - matthewjasper:remove-cfg-usage, r=llogiq
bors [Sun, 8 Sep 2019 20:09:12 +0000 (20:09 +0000)]
Auto merge of #4523 - matthewjasper:remove-cfg-usage, r=llogiq

Stop using the HIR CFG

This does slightly change the behavior:

* Functions with unreachable code don't end up being ignored
* `match` guards are counted as +1 for each guard, rather than +1 for each pattern with a guard
* Or patterns don't add to the complexity

changelog: none

4 years agoUpdate non_expressive_names for or patterns
Matthew Jasper [Sun, 8 Sep 2019 10:40:04 +0000 (11:40 +0100)]
Update non_expressive_names for or patterns

4 years agoRemove use of the HIR CFG
Matthew Jasper [Sun, 8 Sep 2019 10:39:42 +0000 (11:39 +0100)]
Remove use of the HIR CFG

4 years agoFix `or_fun_call` bad suggestion
Michael Wright [Sun, 8 Sep 2019 09:03:45 +0000 (11:03 +0200)]
Fix `or_fun_call` bad suggestion

Closes #4514

4 years agoAuto merge of #4508 - rust-lang:reduced-symbolism, r=phansch
bors [Fri, 6 Sep 2019 15:10:06 +0000 (15:10 +0000)]
Auto merge of #4508 - rust-lang:reduced-symbolism, r=phansch

Simplify `utils::match_def_path`, removing a FIXME

changelog: none

This removes the `Vec<Symbol>` allocation. We still need to call `cx.get_def_path`, but this should already have been interned, and I don't see how we can keep ergonomics of that function without allocating a `Vec`.

r? @phansch

4 years agoAuto merge of #4512 - mati865:rustup, r=phansch
bors [Fri, 6 Sep 2019 12:13:06 +0000 (12:13 +0000)]
Auto merge of #4512 - mati865:rustup, r=phansch

Rustup to rust-lang/rust#64111

changelog: none

4 years agoRustup to rust-lang/rust#64111
Mateusz Mikuła [Fri, 6 Sep 2019 11:57:27 +0000 (13:57 +0200)]
Rustup to rust-lang/rust#64111

4 years agoAuto merge of #4500 - jeremystucki:refactoring, r=flip1995
bors [Fri, 6 Sep 2019 08:41:56 +0000 (08:41 +0000)]
Auto merge of #4500 - jeremystucki:refactoring, r=flip1995

Small refactoring

changelog: none

4 years agoSimplify , removing a FIXME
Andre Bogus [Fri, 6 Sep 2019 07:40:36 +0000 (09:40 +0200)]
Simplify , removing a FIXME

4 years agoAuto merge of #4506 - derivmug:fix-add-lint-example, r=phansch
bors [Fri, 6 Sep 2019 04:50:12 +0000 (04:50 +0000)]
Auto merge of #4506 - derivmug:fix-add-lint-example, r=phansch

Fix two occurences of TESTNAME=ui/foo_functions

changelog: Fix two occurrences of the wrong path to the foo_functions test in doc/adding_lints.md

This PR fixes the other two wrong paths to the example test. I already created a PR yesterday but only changed one. The old command was `TESTNAME=ui/foo_functions cargo uitest` and is now `TESTNAME=foo_functions cargo uitest`.

4 years agoFix two occurences of TESTNAME=ui/foo_functions
Luca Beetz [Thu, 5 Sep 2019 22:54:49 +0000 (00:54 +0200)]
Fix two occurences of TESTNAME=ui/foo_functions

This commit fixes two occurences of the wrong path to the foo_functions example test in doc/adding-lints.md

4 years agoAuto merge of #4489 - JohnTitor:fix-redundant-pattern-false-positive, r=flip1995
bors [Thu, 5 Sep 2019 16:15:36 +0000 (16:15 +0000)]
Auto merge of #4489 - JohnTitor:fix-redundant-pattern-false-positive, r=flip1995

Fix `redundant_pattern` false positive

Fix #4428

changelog: Fix `redundant_pattern` false positive

4 years agoRun rustfix
Yuki Okushi [Thu, 5 Sep 2019 13:45:52 +0000 (22:45 +0900)]
Run rustfix

4 years agoAuto merge of #4502 - lzutao:rustup-64141, r=phansch
bors [Thu, 5 Sep 2019 08:26:00 +0000 (08:26 +0000)]
Auto merge of #4502 - lzutao:rustup-64141, r=phansch

Rustup "Minimize uses of `LocalInternedString`"

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

changelog: none

4 years agoRustup "Minimize uses of `LocalInternedString`"
Lzu Tao [Thu, 5 Sep 2019 06:56:10 +0000 (13:56 +0700)]
Rustup "Minimize uses of `LocalInternedString`"

4 years agoAuto merge of #4501 - derivmug:update-lint-doc, r=phansch
bors [Wed, 4 Sep 2019 17:59:19 +0000 (17:59 +0000)]
Auto merge of #4501 - derivmug:update-lint-doc, r=phansch

Remove ui/ from TESTNAME for foo lint example

changelog: Remove ui/ from TESTNAME in doc/adding-lints.md

This PR remove the `ui/` from the TESTNAME of the example foo lint in the 'Adding lints' documentation.

4 years agoRemove ui/ from TESTNAME for foo lint example
Luca Beetz [Wed, 4 Sep 2019 16:34:19 +0000 (18:34 +0200)]
Remove ui/ from TESTNAME for foo lint example

4 years agoAuto merge of #4495 - JohnTitor:fix-map-entry-false-positive, r=phansch
bors [Wed, 4 Sep 2019 16:25:49 +0000 (16:25 +0000)]
Auto merge of #4495 - JohnTitor:fix-map-entry-false-positive, r=phansch

Fix `map_entry` false positive

Fixes #4219

changelog: Fix `map_entry` false positive

4 years agoMake it auto fixable lint
Yuki Okushi [Wed, 4 Sep 2019 15:50:22 +0000 (00:50 +0900)]
Make it auto fixable lint

4 years agoFix `redundant_pattern` false positive
Yuki Okushi [Mon, 2 Sep 2019 19:49:14 +0000 (04:49 +0900)]
Fix `redundant_pattern` false positive

4 years agoImprove tests
Yuki Okushi [Wed, 4 Sep 2019 15:24:45 +0000 (00:24 +0900)]
Improve tests

4 years agoAuto merge of #4487 - JohnTitor:deref-addrof-external-macro, r=flip1995
bors [Wed, 4 Sep 2019 15:01:06 +0000 (15:01 +0000)]
Auto merge of #4487 - JohnTitor:deref-addrof-external-macro, r=flip1995

Don't check across macro boundary in `deref_addrof`

Fixes #4289

changelog: Allow `deref_addrof` in macros

4 years agoRefactor option handling
Jeremy Stucki [Wed, 4 Sep 2019 14:19:59 +0000 (16:19 +0200)]
Refactor option handling

4 years agoAuto merge of #4418 - euclio:byte-lit-suggestion, r=flip1995
bors [Wed, 4 Sep 2019 13:33:47 +0000 (13:33 +0000)]
Auto merge of #4418 - euclio:byte-lit-suggestion, r=flip1995

use a structured suggestion for char-lit-as-u8

changelog: use a structured suggestion for char-lit-as-u8

4 years agoRun update_lints
flip1995 [Wed, 4 Sep 2019 13:33:14 +0000 (15:33 +0200)]
Run update_lints

4 years agouse a structured suggestion for char-lit-as-u8
Andy Russell [Tue, 20 Aug 2019 02:24:07 +0000 (22:24 -0400)]
use a structured suggestion for char-lit-as-u8

4 years agoAuto merge of #4498 - sinkuu:checked_arithmetic_unwrap, r=flip1995
bors [Wed, 4 Sep 2019 12:14:41 +0000 (12:14 +0000)]
Auto merge of #4498 - sinkuu:checked_arithmetic_unwrap, r=flip1995

Add manual_saturating_arithmetic lint

changelog: add `manual_saturating_arithmetic` lint

Fixes #1557. This lint detects manual saturating arithmetics like `x.checked_add(10u32).unwrap_or(u32::max_value())` and suggests replacing with `x.saturating_add(10u32)`.

4 years agoHide variables in doc-test
Shotaro Yamada [Wed, 4 Sep 2019 12:10:08 +0000 (21:10 +0900)]
Hide variables in doc-test

4 years agoFix doctest and renaming src
Shotaro Yamada [Wed, 4 Sep 2019 12:06:28 +0000 (21:06 +0900)]
Fix doctest and renaming src

4 years agoAuto merge of #4490 - mikerite:fix-4364, r=flip1995
bors [Wed, 4 Sep 2019 11:35:13 +0000 (11:35 +0000)]
Auto merge of #4490 - mikerite:fix-4364, r=flip1995

Fix `too_many_lines` false positive

changelog: Fix `too_many_lines` false positive

4 years agoAdd manual_saturating_arithmetic lint
Shotaro Yamada [Wed, 4 Sep 2019 07:08:48 +0000 (16:08 +0900)]
Add manual_saturating_arithmetic lint

4 years agoAuto merge of #4454 - BO41:search_is_some, r=flip1995
bors [Wed, 4 Sep 2019 07:53:44 +0000 (07:53 +0000)]
Auto merge of #4454 - BO41:search_is_some, r=flip1995

Dereference one less on search_is_some and make it auto-fixable

Fixes #4453

changelog: none

4 years agoTry to fix .fixed
BO41 [Thu, 29 Aug 2019 08:06:56 +0000 (10:06 +0200)]
Try to fix .fixed