ThibsG
62f60e1ae5
No lint with cfg!
and fix sugg for macro in needless_bool
lint
2020-10-24 09:37:23 +02:00
Matthias Krüger
0876f17d77
bool-comparison: make lint adhere to lint message convention
2020-08-10 20:55:23 +02:00
Valentin Lazureanu
5a20489c5c
Rename TypeckTables to TypeckResults.
2020-07-17 08:47:04 +00:00
Eduard-Mihai Burtescu
30c046ede4
Use 'tcx for references to AccessLevels wherever possible.
2020-07-03 00:04:48 +03:00
Eduard-Mihai Burtescu
f5ce0e5fe9
rustc_lint: only query typeck_tables_of
when a lint needs it.
2020-06-26 02:56:23 +03:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
Jane Lusby
c8f3241177
Update clippy_lints/src/needless_bool.rs
2020-03-30 12:19:30 -07:00
mgr-inz-rafal
ff9602515e
Code clean-up and formatting
2020-03-23 21:21:18 +01:00
mgr-inz-rafal
3d3af07845
Provide appropriate suggestion
2020-03-23 21:00:02 +01:00
mgr-inz-rafal
12796cd688
Initial lint without suggestion
2020-03-23 20:29:12 +01:00
Matthias Krüger
2204bf20ae
clean up a few lint docs
2020-03-18 02:50:39 +01:00
Yuki Okushi
4253aa7137
Rustup to rust-lang/rust#69592
2020-03-01 12:23:33 +09:00
flip1995
8472ecda0f
Fix fallout
2020-02-21 11:14:18 +01:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Yuki Okushi
5ac08b0cc9
Normalize lint messages
2020-01-07 18:26:55 +09:00
Yuki Okushi
2f2eaf8b7e
Rustup to rust-lang/rust#67886
2020-01-07 01:46:33 +09:00
Philipp Hansch
c5178e82b4
Rustup to https://github.com/rust-lang/rust/pull/67853
...
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2020-01-04 11:30:03 +01:00
Yuki Okushi
e2636729ec
Rustup to rust-lang/rust#66936
2019-12-27 16:13:53 +09:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
James Wang
52408f5b7d
Add a new lint for comparison chains
2019-09-24 16:55:05 -05: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
Philipp Hansch
cdfb72a5e1
fmt
2019-08-05 20:53:24 +02:00
Philipp Hansch
4cfb0966a1
Fix needless_bool suggestion with if-else-if-else
...
Closes #4334
2019-08-05 20:52:38 +02:00
Philipp Hansch
abfa8a952c
Doctests: Fix all complexity lint docs
...
cc #4319
2019-08-02 18:16:35 +02: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
mgr-inz-rafal
7ced26d863
Typos and minor grammar corrections
2019-06-12 20:07:10 +02:00
Manish Goregaokar
7eb8018554
Rename in_macro to in_macro_or_desugar
2019-05-11 21:39:02 -07:00
Manish Goregaokar
da8b56d99a
Fix needless_bool.rs
2019-05-10 23:40:42 -07:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations
2019-03-05 18:45:08 -05:00
bors
0957f7d3b7
Auto merge of #3817 - rust-lang:fix-bool_comparison-on-non-bool, r=oli-obk
...
Fix `bool_comparison` with non-`bool` expressions
Fixes #3703 .
It just moves around the type check that was already there for some comparison to all of them, because if one type isn't `bool`, none of those comparison can be simplified.
2019-02-26 15:51:40 +00:00
mcarton
c0c0686a65
Fix bool_comparison
with non-bool
expressions
2019-02-25 22:31:16 +01:00
ljedrz
8dac8a6ba4
HirIdify some lints
2019-02-24 20:49:43 +01:00
Matthias Krüger
e9e0a7e3bd
rustup https://github.com/rust-lang/rust/pull/57726
2019-01-27 01:42:34 +01:00
Grzegorz Bartoszek
0f5c43a722
Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool".
2019-01-22 14:07:53 +01:00
bors
54978a571c
Auto merge of #3680 - g-bartoszek:needless-bool-else-if-brackets, r=oli-obk
...
needless bool lint suggestion is wrapped in brackets if it is an "els…
…e" clause of an "if-else" statement
2019-01-21 11:47:06 +00:00
Grzegorz Bartoszek
34785a12f4
formatting fix
2019-01-21 12:04:25 +01:00
Oliver Scherer
4532073a29
Update clippy_lints/src/needless_bool.rs
...
Co-Authored-By: g-bartoszek <grzegorz.bartoszek@thaumatec.com>
2019-01-21 11:41:33 +01:00
Grzegorz Bartoszek
0a0792e535
formatting fix
2019-01-21 11:14:34 +01:00
Grzegorz Bartoszek
adce3ef966
needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement
2019-01-20 16:15:00 +01:00
Michael Wright
f51f0178dd
Fixed breakage due to rust-lang/rust#57489
2019-01-20 12:21:30 +02:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
...
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
Konrad Borowski
3f62fc3a7e
Remove crate:: prefixes from crate paths
...
This is somewhat misleading, as those are actually external crates,
and don't need a crate:: prefix.
2018-12-29 16:05:49 +01:00
Lucas Lois
de42dfbab7
Changes lint sugg to bitwise and operator &
2018-12-17 15:32:24 -03:00
Lucas Lois
bc48890b47
Implements lint for order comparisons against bool
2018-12-16 21:43:32 -03:00