flip1995
d3e88a58b9
Fix ICE #4775
2019-11-06 18:14:47 +01:00
HMPerson1
4578e5e15e
Fix suggestion span in explicit_counter_loop
2019-10-18 01:15:54 -04:00
HMPerson1
72f3439346
Suggest calling iter
if needed in explicit_counter_loop
2019-10-18 00:03:27 -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
flip1995
b46f5b4a98
Rustup to rust-lang/rust#64874
...
Episode 1 - The simple cases
2019-10-04 15:39:46 +02:00
Manish Goregaokar
9e166e09b8
Use new spans for expansion checking in loop lints
2019-10-01 10:17:29 -07: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
Manish Goregaokar
980650eec2
needless_collect: fix suggestion, make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
982c51e769
arm.pats -> arm.pat
2019-09-25 12:52:16 -07:00
Manish Goregaokar
bbfb9a49e3
for_loop: Split test into fixable/unfixable, make needless_range_loop use updated range syntax
2019-09-21 10:01:06 +09:00
Michael Wright
16ce071bed
Work around qpath_res issue
2019-09-18 21:57:14 +02: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
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
Jeremy Stucki
3fc1ec1ffd
Refactor option handling
2019-09-04 16:19:59 +02:00
Arthur Woimée
223e23a5ce
fix misleading doc for explicit_counter_loop lint
2019-09-01 21:54:47 +02:00
BO41
eebb7cd839
Add examples to some complexity lints
2019-08-22 15:41:07 +02:00
KRAAI, MATTHEW [VISUS]
204b2f3658
Remove in_macro_or_desugar
2019-08-19 09:30:32 -07:00
BO41
b17cb32bcb
Add "could be written as" example to MANUAL_MEMCPY
2019-08-17 13:09:03 +00:00
Philipp Hansch
42f03539ca
Deprecate unused_collect lint
...
I found this because we only had two test cases in total for this lint.
It turns out the functionality is fully covered by rustc these days.
[Playground Examples](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eb8ee6db389c77180c9fb152d3c608f4 )
changelog: Deprecate `unused_collect` lint. This is fully covered by
rustc's `#[must_use]` on `collect`
cc #2846
2019-08-14 21:47:11 +02:00
Lzu Tao
e4f8cd9672
Rustup https://github.com/rust-lang/rust/pull/59369
2019-08-06 19:20:41 +07:00
Philipp Hansch
1dc9a5012e
Doctests: Enable running doc tests for pedantic lints
2019-08-03 20:36:38 +02:00
bors
5c1e30ab05
Auto merge of #4327 - phansch:doctests_perf, r=flip1995
...
Doctests: Enable running doc tests for perf lints
changelog: none
This should be possible to merge independently of #4325
cc #4319
2019-08-03 14:06:13 +00:00
Philipp Hansch
c0cdfd296e
Doctests: Enable running doc tests for perf lints
...
This should be possible to merge independently of #4325
cc #4319
2019-08-03 08:08:00 +02:00
Philipp Hansch
abfa8a952c
Doctests: Fix all complexity lint docs
...
cc #4319
2019-08-02 18:16:35 +02:00
Michael Wright
c72be0f65a
rustfmt
2019-07-06 19:43:34 +02:00
Michael Wright
adcc02ed8a
Address reviews
2019-07-06 19:35:08 +02:00
Michael Wright
0579c3e0aa
Fix breakage due to rust-lang/rust#61988
2019-07-06 19:06:49 +02:00
Lzu Tao
7293defb34
Rename hir::map::local_def_id_from_hir_id to local_def_id
2019-07-06 10:52:51 +07:00
Michael Wright
7c98915da9
Fix never_loop
false positive
...
Closes #4058
2019-07-01 07:22:04 +02:00
Manish Goregaokar
d744dcdaaf
find_by_hir_id -> find
2019-06-25 14:34:07 -07:00
Manish Goregaokar
c47a7e4ef2
get_parent_node_by_hir_id -> get_parent_node
2019-06-25 14:33:51 -07:00
Lzu Tao
6aea41e050
Fix fallout cause NodeId pruning
2019-06-22 13:41:16 +07:00
Lzu Tao
4fa498a3eb
Fix warnings about unnecessary lifetime bounds
...
Rustup https://github.com/rust-lang/rust/pull/61172
2019-06-20 01:36:23 +07:00
Lzu Tao
5e887b2a6a
Fix lifetime mismatch between LateContext and Ty
2019-06-19 17:21:53 +07:00
Lzu Tao
321779979a
Fix missing field in ExprKind::Yield
...
Rustup rust-lang/rust#61941
2019-06-19 16:59:25 +07:00
bors
28a39e9741
Auto merge of #4165 - BO41:needless_range_loop, r=phansch
...
Add example to needless_range_loop
adds a "could be written as" example
btw, is it correct that the lint triggers even if the index is used not just for getting the values by index?
So that I have to add `.iter().enumerate()` to still get an index?
changelog: none
2019-06-03 08:28:15 +00:00
BO41
dd007e4477
Change from ignore to rust
2019-06-02 20:06:50 +02:00
Mateusz Mikuła
a3ace5c3ca
Cargo fmt
2019-06-02 18:58:11 +02:00
Mateusz Mikuła
9fefe36737
Rustup for https://github.com/rust-lang/rust/pull/61276
2019-06-02 18:30:40 +02:00
BO41
bd8f289247
Add example to needless_range_loop
2019-06-02 15:28:32 +02:00
Oliver Scherer
f7f85a0dca
Prevent symbocalypse
2019-05-17 23:53:54 +02:00
Oliver Scherer
dfbc74b08b
Rustfmt all the things
2019-05-14 10:33:48 +02:00
Oliver Scherer
b2dbda4d48
Use symbols instead of strings
2019-05-14 10:33:42 +02:00
Manish Goregaokar
7eb8018554
Rename in_macro to in_macro_or_desugar
2019-05-11 21:39:02 -07:00
Manish Goregaokar
69b1da4d82
Remove some unnecessary If arms
2019-05-10 23:40:42 -07:00
Matthias Krüger
d618637c05
Rustup to rustc 1.36.0-nightly ( 13fde05b1
2019-05-03)
2019-05-03 22:28:34 -07:00