Wilco Kusee
f38fb56baf
Limit infinite_iter collect() check to known types
2018-12-31 13:38:31 +01:00
bors
529f698c23
Auto merge of #3599 - xfix:use-hash-set-for-valid-idents, r=oli-obk
...
Use an FxHashSet for valid idents in documentation lint
2018-12-30 17:46:01 +00:00
bors
735607c1f9
Auto merge of #3588 - detrumi:tuple_struct_use_self, r=phansch
...
`use_self` for tuple structs
Fixes #3498
2018-12-30 11:12:55 +00:00
bors
aee138a7cf
Auto merge of #3597 - xfix:match-ergonomics, r=phansch
...
Match ergonomics (lints from A to B)
2018-12-30 10:40:36 +00:00
Wilco Kusee
1d10de66de
Remove false negatives from known problems
2018-12-30 08:23:39 +01:00
Wilco Kusee
ab42ba4f54
Implement use_self for tuple structs
2018-12-30 08:23:38 +01:00
Wilco Kusee
0f3dcdc3aa
Document known problems
2018-12-30 08:20:49 +01:00
Matthias Krüger
e590025f61
rustup https://github.com/rust-lang/rust/pull/56225/
...
item.name -> item.ident.name
2018-12-30 01:09:24 +01:00
bors
6cba3da727
Auto merge of #3558 - russelltg:new_without_default_merge, r=flip1995
...
Merge new_without_default_derive into new_without_default
Closes #3525 , deprecating new_without_default_derive and moving both lints into new_without_default.
2018-12-29 17:31:35 +00:00
Konrad Borowski
ab70e0e742
Use an FxHashSet for valid idents in documentation lint
2018-12-29 18:08:53 +01:00
Konrad Borowski
aeabb890d6
Use match ergonomics for booleans lint
2018-12-29 17:38:15 +01:00
Konrad Borowski
13c857b745
Use match ergonomics for block_in_if_condition lint
2018-12-29 17:32:09 +01:00
Konrad Borowski
fe151ebb9c
Use match ergonomics for bit_mask lint
2018-12-29 17:31:32 +01:00
Konrad Borowski
931e2b0026
Use match ergonomics for attrs lint
2018-12-29 17:29:50 +01:00
Konrad Borowski
3bf71a8e62
Use match ergonomics for assign_ops lint
2018-12-29 17:27:26 +01:00
Konrad Borowski
79cd95cf35
Use match ergonomics for artithmetic lint
2018-12-29 17:25:45 +01:00
Konrad Borowski
0ddb628488
Use match ergonomics for approx_const lint
2018-12-29 17:25:07 +01:00
bors
4d60841205
Auto merge of #3596 - xfix:remove-crate-from-paths, r=flip1995
...
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:15:57 +00: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
Konrad Borowski
9fe8a3e52e
Support array indexing expressions in unused write to a constant
2018-12-29 15:34:15 +01:00
Konrad Borowski
847898f18f
Mark writes to constants as side-effect-less
2018-12-29 15:18:51 +01:00
Konrad Borowski
44bf8e0c3d
Remove unsafe from consts clippy lints
2018-12-29 00:50:03 +01:00
Peter Fürstenau
6ee0e22204
Merge remote-tracking branch 'upstream/master'
2018-12-28 20:19:51 +01:00
Russell Greene
d127aed737
Merge new_without_default_derive into new_without_default
2018-12-28 10:57:58 -07:00
flip1995
909bfd3cd8
Match on ast/hir::ExprKind::Err
2018-12-28 13:31:19 +01:00
bors
721f688eff
Auto merge of #3577 - daxpedda:master, r=flip1995
...
Fix false positives for `implicit_return` and `empty_loop` on macro expansion.
This PR only fixes `implicit_return` and `empty_loop`.
But I suspect this bug may affect a lot of other lints.
2018-12-27 15:21:22 +00:00
Matthias Krüger
99454bc9a1
rustup https://github.com/rust-lang/rust/pull/57069
2018-12-27 11:19:20 +01:00
daxpedda
2d96ef1315
Rustfmt.
2018-12-26 18:13:33 +01:00
Matthias Krüger
7f5e17f3f1
fix a couple of ftrivial typos (NFC).
2018-12-25 18:22:34 +01:00
Philipp Krones
197914439a
Fix macro detection in empty_loop
.
...
Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
2018-12-25 12:57:16 +01:00
daxpedda
a77bcadaa5
Changed macro_backtrace()
to in_macro()
.
2018-12-25 12:48:54 +01:00
daxpedda
b5587a894f
Fix lint detection on macro expansion.
2018-12-24 22:06:08 +01:00
Oliver Scherer
6db409fc0c
FIXME > TODO
2018-12-23 13:29:37 +01:00
Matthias Krüger
ce3e69da1c
rustup https://github.com/rust-lang/rust/pull/56992
2018-12-23 10:42:06 +01:00
bors
52820e588f
Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
...
Document map_clone known problems #498
(cherry picked from commit ada0d2c548
)
This was lost in relicensing (057243f16b
).
However, I [acknowledged](https://github.com/rust-lang/rust-clippy/issues/3099#issuecomment-416482309 ) relicensing so this cherry pick should be fine I guess.
2018-12-22 15:02:50 +00:00
bors
d9cc71fc42
Auto merge of #3341 - HMPerson1:possibly_missing_else, r=phansch
...
Teach `suspicious_else_formatting` about `if .. {..} {..}`
We essentially treat bare blocks `{..}` identically to `if .. {..}`, except for different lint messages.
Fixes #3044
2018-12-22 13:26:22 +00:00
Vlad-Shcherbina
d2c069de1e
Document map_clone known problems #498
...
(cherry picked from commit ada0d2c548
)
2018-12-22 13:44:35 +03:00
Mark Nieweglowski
c6031221e0
panic at map_unit_fn.rs:202 for map() without args
2018-12-22 00:58:07 -05:00
HMPerson1
05ae391e2c
Workaround rust-lang/rust#43081
2018-12-20 22:45:44 -05:00
HMPerson1
88564b743e
Teach suspicious_else_formatting
about if .. {..} {..}
2018-12-20 22:45:37 -05:00
Daniel Silverstone
5875ba3364
mutex_atomic: Correct location of AtomicBool and friends
...
The AtomicBool, AtomicUsize, and friends, types live in the
`std::sync::atomic` module, rather than `std::atomic` as the lint
help text used to say.
2018-12-19 20:47:50 +00:00
Peter Fürstenau
65c35333a4
Only print out question_mark lint when it actually triggered
2018-12-19 20:55:01 +01:00
Peter Fürstenau
e722b1338e
Reinserted commata
2018-12-19 20:31:08 +01:00
bors
61de562454
Auto merge of #3554 - klausi:module_name_repeat, r=oli-obk
...
chore(module_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language
See #3521
2018-12-18 13:28:12 +00:00
Peter Fürstenau
ee0856cbeb
Recomend .as_ref()?
in certain situations
2018-12-18 13:57:38 +01:00
Peter Fürstenau
8b0ea22885
Deduplicate some code?
2018-12-18 13:57:38 +01:00
bors
176778fe92
Auto merge of #3556 - lucasloisp:bool-ord-comparison, r=oli-obk
...
Implements lint for order comparisons against bool (#3438 )
As described on issue #3438 , this change implements linting for `>` and `<` comparisons against both `boolean` literals and between expressions.
2018-12-18 10:11:08 +00:00
Wilco Kusee
24ef8db402
Do not mark as_ref as useless if it's followed by a method call
2018-12-17 21:33:50 +01:00
Lucas Lois
de42dfbab7
Changes lint sugg to bitwise and operator &
2018-12-17 15:32:24 -03:00
flip1995
a44adaa5ed
Rename lint to MODULE_NAME_REPETITIONS
2018-12-17 14:29:19 +01:00