Commit Graph

6725 Commits

Author SHA1 Message Date
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
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
bors
ffe57fad85 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)`.
2019-09-04 12:14:41 +00:00
Shotaro Yamada
c6fb9c8a2a Hide variables in doc-test 2019-09-04 21:10:08 +09:00
Shotaro Yamada
45fde0f86f Fix doctest and renaming src 2019-09-04 21:06:28 +09:00
bors
a2c4b2b8da Auto merge of #4490 - mikerite:fix-4364, r=flip1995
Fix `too_many_lines` false positive

changelog: Fix `too_many_lines` false positive
2019-09-04 11:35:13 +00:00
Shotaro Yamada
4960f79476 Add manual_saturating_arithmetic lint 2019-09-04 18:38:25 +09:00
bors
8239b7616f 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
2019-09-04 07:53:44 +00:00
BO41
64cd9e4d60 Try to fix .fixed 2019-09-03 18:56:23 +02:00
bors
11da8c18a2 Auto merge of #4479 - rust-lang:uninit_assume_init, r=flip1995
lint against `MaybeUninit::uninit().assume_init()`

changelog: add `uninit_assumed_init` lint

This fixes #4272
2019-09-03 16:14:40 +00:00
Andre Bogus
b01f2d1126 lint against MaybeUninit::uninit().assume_init() 2019-09-03 17:37:38 +02:00
bors
aeadf1562c Auto merge of #4486 - lzutao:fix-panic-unseparate-literals, r=flip1995
Fix index out of bound in case of empty snippet

cc #4480

changelog: none
2019-09-03 13:17:30 +00:00
Yuki Okushi
c94c5e9048 Fix map_entry false positive 2019-09-03 20:31:02 +09:00
bors
2d7da04e17 Auto merge of #4493 - JohnTitor:fix-build-bytes, r=flip1995
Rustup to rust-lang/rust#63561

changelog: none
2019-09-03 10:44:47 +00:00
Yuki Okushi
7d30cb6e76 Remove Allocation::bytes 2019-09-03 18:29:08 +09:00
Michael Wright
232dd43fe9 Fix occurrences of too_many_lines violations 2019-09-03 06:26:49 +02:00
Michael Wright
0ae1a69330 Fix too_many_lines false positive
Fixes #4364
2019-09-03 06:25:54 +02:00
Yuki Okushi
9a5b996228 Allow deref_addrof in macros 2019-09-03 00:17:23 +09:00
Lzu Tao
17d445b66d Fix index out of bound in case of empty snippet 2019-09-02 20:38:40 +07:00
bors
1f9993729b Auto merge of #4482 - awoimbee:doc_explicit_counter_loop, r=flip1995
fix misleading doc for explicit_counter_loop lint

changelog: replace misleading examples for explicit_counter_loop & more concise `Why is it bad?` section

This fixes #4472
2019-09-02 12:46:13 +00:00
bors
6dcdd46061 Auto merge of #4477 - mikerite:fix-4291, r=flip1995
Fix `extra_unused_lifetimes` false positive

Fixes #4291

changelog: Fix `extra_unused_lifetimes` false positive
2019-09-02 12:17:47 +00:00
Arthur Woimée
223e23a5ce fix misleading doc for explicit_counter_loop lint 2019-09-01 21:54:47 +02:00
Michael Wright
2fdfd60569 Fix needless_lifetimes false positive 2019-09-01 08:11:40 +02:00
Michael Wright
4458bef5d1 Simplify issue-4291 test 2019-09-01 07:55:29 +02:00
Michael Wright
88750f9ad7 Fix extra_unused_lifetimes false positive
Fixes #4291
2019-08-31 08:16:04 +02:00
bors
a3fcaee562 Auto merge of #4473 - phansch:fix_cast_lossless_fp, r=flip1995
Fix cast_lossless false positive in impl const fn

Fixes https://github.com/rust-lang/rust-clippy/issues/3656#issuecomment-526387382

changelog: Fix false positive in `cast_lossless`
2019-08-30 20:30:53 +00:00
bors
70e7d075df Auto merge of #4475 - flip1995:rustup, r=phansch
Rustup to rust-lang/rust#60966

changelog: none
2019-08-30 08:12:11 +00:00
flip1995
3c11406c1f
Rustup to rust-lang/rust#60966 2019-08-30 10:11:27 +02:00
bors
2bff3d87d5 Auto merge of #4446 - mikerite:fix-4437, r=phansch
Fix `match_as_ref` bad suggestion

Fixes #4437

changelog: Fix `match_as_ref` bad suggestion
2019-08-30 06:07:41 +00:00
Philipp Hansch
fb1ae1747f
Fix cast_lossless false positive in impl const fn
Fixes https://github.com/rust-lang/rust-clippy/issues/3656#issuecomment-526387382
2019-08-30 07:22:35 +02:00
bors
28a8a6a483 Auto merge of #4450 - phansch:fix_const_fn_fp, r=flip1995
Fix missing_const_for_fn false positive

We don't want to lint if the type of the method implements drop.
(constant functions cannot evaluate destructors)

changelog: Fix `missing_const_for_fn` false positive

Fixes #4449
2019-08-29 17:24:21 +00:00
Philipp Hansch
5e1fdf9ae6
Add missing UI test change 2019-08-29 18:37:43 +02:00
flip1995
6bbf418747
Fix tests 2019-08-29 17:34:33 +02:00
flip1995
dac81d867b
Use the spans returned by utils::method_calls 2019-08-29 17:34:03 +02:00
flip1995
832c0830ec
Also return the method spans in utils::method_calls 2019-08-29 17:34:02 +02:00
BO41
945d4cf69f
Dereference one less on search_is_some and make it auto-fixable 2019-08-29 17:34:02 +02:00