Michael Wright
38d0b2199a
Correct iterator_step_by_zero
documentation
2019-12-18 18:59:59 +02:00
Michael Wright
e097fca4df
Update iterator_step_by_zero
...
Move `iterator_step_by_zero` into `methods` since it applies to all
iterators and not just ranges. Simplify the code while doing so.
2019-12-18 18:59:43 +02:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
Phil Hansch
a05f3cb9a1
Rollup merge of #4847 - rust-lang:offest, r=phansch
...
fixing a typo
changelog: none
2019-11-28 10:19:06 +01:00
Lzu Tao
d0e0ffa99f
make use of Result::map_or
2019-11-28 10:52:20 +07:00
Manish Goregaokar
341e266508
Add BorrowKind::Ref
2019-11-27 14:39:28 -08:00
Andre Bogus
47ef5394de
fixing a typo
2019-11-25 14:06:34 +01:00
flip1995
d2d62de841
Rustup to rust-lang/rust#64856
2019-11-25 13:56:24 +01:00
flip1995
d43c424145
Rustup to rust-lang/rust#66671
2019-11-25 13:18:38 +01:00
bors
cc35165f52
Auto merge of #4840 - flip1995:rollup-jqk3a3i, r=flip1995
...
Rollup of 5 pull requests
Successful merges:
- #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
- #4766 (Fix false positive in derive_hash_xor_eq)
- #4811 (Literal Representation Restructure)
- #4820 (doc: fix the comment above the lint function)
- #4830 (use more efficient code to generate repeated string)
Failed merges:
r? @ghost
changelog: none
2019-11-23 17:40:57 +00:00
Philipp Krones
ae69bc4980
Rollup merge of #4820 - guanqun:comment-fix, r=flip1995
...
doc: fix the comment above the lint function
it's a simple comment fix.
---
changelog: none
2019-11-23 18:16:01 +01:00
Andre Bogus
c21b198576
New lint: zst_offset
2019-11-15 22:39:27 +01:00
Guanqun Lu
f2d8197110
doc: fix the comment above the lint function
2019-11-16 01:55:06 +08:00
Manish Goregaokar
e9a3e54910
MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy
2019-11-11 10:58:39 -08:00
flip1995
08fd397c2c
Deprecate into_iter_on_array
lint
...
This lint was uplifted/reimplemented by rustc.
Rustup to rust-lang/rust#66017
2019-11-07 14:04:29 +01:00
Lzu Tao
51632530d7
rustup rust-lang/rust#65776
2019-11-06 17:46:45 +07:00
Lzu Tao
4c7387e965
rustup https://github.com/rust-lang/rust/pull/65535
2019-10-19 12:27:21 +07:00
Heinz N. Gies
7f454d8d06
Split out tests
2019-10-18 07:40:48 +02:00
Heinz N. Gies
a7ad78f3eb
Add expect
...
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-10-18 07:37:58 +02:00
HMPerson1
76b44f34b9
Add inefficient_to_string
lint
2019-10-16 15:54:20 -04:00
Andre Bogus
cc622608db
new lints around #[must_use]
fns
...
`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.
`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.
`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.
2019-10-14 12:09:04 +02:00
bors
b690cdb1e7
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
2019-10-08 07:11:26 +00:00
flip1995
3aa531c194
Run util/dev fmt
2019-10-05 12:42:09 +02:00
flip1995
3b23092b69
Get rid of rvalue_promotable_map method call
2019-10-05 12:38:38 +02:00
Andre Bogus
e3f143ff0a
account for doc visibility
2019-10-02 21:15:28 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
Lzu Tao
a7b7e19f49
Rustup https://github.com/rust-lang/rust/pull/64513
2019-09-26 16:03:36 +07:00
Matthias Krüger
b72982759c
run rustfmt
2019-09-11 08:26:57 +02: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
Andre Bogus
e3c4ffd4aa
Use diagnostic item for
2019-09-09 05:43:39 +02:00
Michael Wright
9bdfd0683f
Fix or_fun_call
bad suggestion
...
Closes #4514
2019-09-08 11:03:45 +02:00
Jeremy Stucki
3fc1ec1ffd
Refactor option handling
2019-09-04 16:19:59 +02: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
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
Andre Bogus
b01f2d1126
lint against MaybeUninit::uninit().assume_init()
2019-09-03 17:37:38 +02:00
flip1995
3c11406c1f
Rustup to rust-lang/rust#60966
2019-08-30 10:11:27 +02:00
flip1995
dac81d867b
Use the spans returned by utils::method_calls
2019-08-29 17:34:03 +02:00
BO41
945d4cf69f
Dereference one less on search_is_some and make it auto-fixable
2019-08-29 17:34:02 +02:00
Yuki Okushi
2c282252a9
Replace Arg
with Param
2019-08-28 18:33:25 +09:00
bors
f760088820
Auto merge of #4430 - lzutao:defid_trait_alias, r=flip1995
...
Account for trait alias when looking for defid
I hit the crash on the `expect` call when running clippy on rustc libcore.
Hopefully this will fix it.
changelog: none
2019-08-26 12:46:00 +00:00
bors
ba6681300e
Auto merge of #4436 - BO41:written_as, r=phansch
...
Add some "could be written as" examples
fixes #4405
changelog: none
2019-08-26 11:11:57 +00:00
Lzu Tao
dac2509bac
Account for trait alias when looking for defid
2019-08-25 20:36:11 +07:00
BO41
31a6ab47e1
Fix lint doc
2019-08-24 13:57:25 +02:00
Jeremy Stucki
2da8288433
Refactor some minor things
2019-08-23 22:52:04 +02:00