Commit graph

6763 commits

Author SHA1 Message Date
Jason Olson
80822b430d
Convert to Place's new boxed slice projection
Fixes breaking change from rust-lang PR https://github.com/rust-lang/rust/pull/63420/
2019-09-13 18:49:11 -07:00
bors
ff4a3fb52f Auto merge of #4536 - matthiaskrgr:impl_lint_doc, r=flip1995
docs: fix broken link in adding_lints documantation

changelog: none
2019-09-12 08:10:43 +00:00
bors
30c75ed5b3 Auto merge of #4538 - mikerite:fix-3567, r=flip1995
Verify that issue #3567 is resolved

Closes #3567

changelog: none
2019-09-12 07:42:38 +00:00
Michael Wright
67f149215f Verify that issue #3567 is resolved
Closes #3567
2019-09-12 08:47:11 +02:00
Matthias Krüger
6038c31637 docs: fix broken link in adding_lints documantation 2019-09-11 21:53:12 +02:00
bors
6ca5b2053a 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
2019-09-11 09:48:25 +00:00
bors
dfa88c6841 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
2019-09-11 07:14:31 +00:00
Matthias Krüger
b72982759c run rustfmt 2019-09-11 08:26:57 +02:00
bors
12bb7d668d 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
2019-09-10 19:40:45 +00:00
Andre Bogus
5823e9468d 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.
2019-09-10 17:46:39 +02:00
bors
c53d2b824e 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
2019-09-10 07:32:11 +00:00
bors
09ed605df8 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
2019-09-10 04:04:42 +00:00
Lzu Tao
b4d7f04a1d Remove feature gate bind-by-move 2019-09-10 09:23:25 +07:00
bors
4ee8bc84cd 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
2019-09-09 16:56:51 +00:00
bors
c733376a5f Auto merge of #4522 - mikerite:fix-4514, r=phansch
Fix `or_fun_call` bad suggestion

Closes #4514

changelog: Fix `or_fun_call` bad suggestion
2019-09-09 15:38:59 +00:00
Andre Bogus
507c03a859 Changed more Vec paths to diagnostic_items 2019-09-09 17:22:41 +02:00
bors
8af4e09605 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
2019-09-09 14:55:33 +00:00
bors
144d940c2f 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
2019-09-09 14:13:55 +00:00
Lzu Tao
ca1c0aa819 Add a regression test for proc-macro attribute 2019-09-09 16:14:32 +07:00
Lzu Tao
a5f4d3ce29 Fix regression in case of proc-macro attribute expansion 2019-09-09 16:14:32 +07:00
Michael Wright
31fbff2a36 Extend use_self to check constructor
Rust did not allow this before.
2019-09-09 07:51:44 +02:00
Michael Wright
f88c224d82 Merge branch 'master' into fix-4514 2019-09-09 07:36:30 +02:00
bors
58e01ea4d7 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
2019-09-09 04:52:29 +00:00
Andre Bogus
e3c4ffd4aa Use diagnostic item for 2019-09-09 05:43:39 +02:00
bors
d4a48edbeb 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
2019-09-08 20:09:12 +00:00
Matthew Jasper
5e7ff6b705 Update non_expressive_names for or patterns 2019-09-08 16:27:54 +01:00
Matthew Jasper
a2477f7759 Remove use of the HIR CFG 2019-09-08 16:27:54 +01:00
Michael Wright
9bdfd0683f Fix or_fun_call bad suggestion
Closes #4514
2019-09-08 11:03:45 +02:00
bors
f30bf69ec7 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
2019-09-06 15:10:06 +00:00
bors
804f8e6b5a Auto merge of #4512 - mati865:rustup, r=phansch
Rustup to rust-lang/rust#64111

changelog: none
2019-09-06 12:13:06 +00:00
Mateusz Mikuła
5afa216e30 Rustup to rust-lang/rust#64111 2019-09-06 13:57:27 +02:00
bors
9672a0400c Auto merge of #4500 - jeremystucki:refactoring, r=flip1995
Small refactoring

changelog: none
2019-09-06 08:41:56 +00:00
Andre Bogus
72058a6d0d Simplify , removing a FIXME 2019-09-06 09:40:36 +02:00
bors
c3d42949c4 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`.
2019-09-06 04:50:12 +00:00
Luca Beetz
3390c512bc 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
2019-09-06 00:54:49 +02:00
bors
313b41fac5 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
2019-09-05 16:15:36 +00:00
Yuki Okushi
0b3f452764 Run rustfix 2019-09-05 22:45:52 +09:00
bors
5f28fda13e 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
2019-09-05 08:26:00 +00:00
Lzu Tao
c12b700e87 Rustup "Minimize uses of LocalInternedString" 2019-09-05 07:16:57 +00:00
bors
abbb7ee12f 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.
2019-09-04 17:59:19 +00:00
Luca Beetz
47d89ae27f Remove ui/ from TESTNAME for foo lint example 2019-09-04 18:34:19 +02:00
bors
e3ae76aeac 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
2019-09-04 16:25:49 +00:00
Yuki Okushi
8be37fdb1d Make it auto fixable lint 2019-09-05 00:50:22 +09:00
Yuki Okushi
e236740f28 Fix redundant_pattern false positive 2019-09-05 00:36:48 +09:00
Yuki Okushi
5c760f0555 Improve tests 2019-09-05 00:24:45 +09:00
bors
98a25241cc 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
2019-09-04 15:01:06 +00:00
Jeremy Stucki
3fc1ec1ffd
Refactor option handling 2019-09-04 16:19:59 +02:00
bors
9d2772207e 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
2019-09-04 13:33:47 +00:00
flip1995
14d1d040b4
Run update_lints 2019-09-04 15:33:14 +02:00
Andy Russell
4ea246b0b3
use a structured suggestion for char-lit-as-u8 2019-09-04 08:50:55 -04:00