Matthias Krüger
c514ff0c93
Update clippy_lints/src/neg_cmp_op_on_partial_ord.rs
...
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-10 23:57:08 +02:00
Matthias Krüger
dabf989195
neg-cmp-op-on-partial-ord: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
178da9b2ef
neg-multiply: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
e519bb3c85
overflow-check-conditional: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
9178363574
path-buf-push-overwrite: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
81f77a411e
range-zip-with-len: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
3e1e0c9bdb
redundant-static-lifetimes: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
5d69ca5e11
also change "deprecated-attribute" message
2020-08-10 23:49:06 +02:00
Matthias Krüger
fe37ddbd11
suspicious-arithmetic-impl: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
7954c22a99
unknown: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
b36a6c9594
ref_in_deref: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
4418ff122f
unneeded-field-pattern: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
2792260636
empty-liner-after-outer-attr: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
0db5cb1393
drop_bounds: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
590b91d8d4
double-parens: make lint adhere to lint message convention and do minor refactoring
2020-08-10 23:49:06 +02:00
Matthias Krüger
ba7a01a6a8
double-comparisons: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
6b0a6a70f8
default-trait-access: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
3d592b5154
cmp_null: make lint adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
8679dd375b
unnecessary_unwrap, panicking_unwrap: make lints adhere to lint message convention
2020-08-10 23:49:06 +02:00
Matthias Krüger
9b7ab1d38b
checked-conversions: make lint adhere to lint message convention
2020-08-10 23:48:57 +02:00
Matthias Krüger
40416c0fa8
naive_bytecount: make lint adhere to lint message convention
2020-08-10 20:55:23 +02:00
Matthias Krüger
fd379a889e
builtin-type-shadow: make lint adhere to lint message convention
2020-08-10 20:55:23 +02:00
Matthias Krüger
0876f17d77
bool-comparison: make lint adhere to lint message convention
2020-08-10 20:55:23 +02:00
Matthias Krüger
e57aafe33f
too-many-lines: make lint adhere to lint message convention
2020-08-10 20:55:23 +02:00
Philipp Krones
ee8db50e13
Rollup merge of #5871 - wiomoc:feature/methodcall-minmax, r=flip1995
...
Lint .min(x).max(y) with x < y
Fixes #5854
changelog: Also lint `ord.min(a).max(b)`, where `a < b` in [`min_max`] lint
2020-08-10 14:56:29 +02:00
Philipp Krones
08ab29bed1
Rollup merge of #5870 - ebroto:5789_allow_unsafe_derive_deserialize, r=flip1995
...
enable #[allow(clippy::unsafe_derive_deserialize)]
Before this change this lint could not be allowed as the code we are checking is automatically generated.
changelog: Enable using the `allow` attribute on top of an ADT linted by [`unsafe_derive_deserialize`].
Fixes : #5789
2020-08-10 14:56:27 +02:00
Philipp Krones
8ee57eed79
Rollup merge of #5869 - wiomoc:feature/implicit-self, r=ebroto,flip1995
...
New lint against `Self` as an arbitrary self type
Fixes #5861
changelog: * [`needless_arbitrary_self_type`] [#5869 ](https://github.com/rust-lang/rust-clippy/pull/5869 )
2020-08-10 14:56:26 +02:00
Philipp Krones
9da5b6d1d0
Rollup merge of #5825 - giraffate:same_item_push, r=Manishearth
...
Add the new lint `same_item_push`
changelog: Add the new lint `same_item_push`
Fixed #4078 . As I said in https://github.com/rust-lang/rust-clippy/issues/4078#issuecomment-658184195 , I referrerd to https://github.com/rust-lang/rust-clippy/pull/4647 .
2020-08-10 14:56:25 +02:00
bors
70c46de012
Auto merge of #5877 - ebroto:5872_loops_ice, r=Manishearth
...
Fix ICE in `loops` module
changelog: Fix ICE related to `needless_collect` when a call to `iter()` was not present.
I went for restoring the old suggestion of `next().is_some()` over `get(0).is_some()` given that `iter()` is not necessarily present (could be e.g. `into_iter()` or `iter_mut()`) and that the old suggestion could change semantics, e.g. a call to `filter()` could be present between `iter()` and the collect part.
Fixes #5872
2020-08-08 18:44:48 +00:00
bors
3899d6001c
Auto merge of #5878 - flip1995:rustup, r=flip1995
...
Rustup
r? @ghost
changelog: none
2020-08-08 17:28:34 +00:00
flip1995
fd87cdb357
Run fmt
2020-08-08 19:20:34 +02:00
Eduardo Broto
888657e09a
Fix ICE in loops
module
2020-08-08 18:13:43 +02:00
Nicholas Nethercote
01bba2c532
Eliminate the SessionGlobals
from librustc_ast
.
...
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This
means they are accessed via the `Session`, rather than via TLS. A few
`Attr` methods and `librustc_ast` functions are now methods of
`Session`.
All of this required passing a `Session` to lots of functions that didn't
already have one. Some of these functions also had arguments removed, because
those arguments could be accessed directly via the `Session` argument.
`contains_feature_attr()` was dead, and is removed.
Some functions were moved from `librustc_ast` elsewhere because they now need
to access `Session`, which isn't available in that crate.
- `entry_point_type()` --> `librustc_builtin_macros`
- `global_allocator_spans()` --> `librustc_metadata`
- `is_proc_macro_attr()` --> `Session`
2020-08-08 12:03:42 +10:00
Christoph Walcher
87e740921a
check impl Ord / is_float
2020-08-07 18:30:20 +02:00
Christoph Walcher
bfe610cc8d
ignore mutable self reference parameters
2020-08-07 18:08:51 +02:00
Christoph Walcher
e03f73e627
fix nits
2020-08-07 18:08:51 +02:00
Christoph Walcher
d635b76eaf
adopt comments from review
2020-08-07 18:08:51 +02:00
Christoph Walcher
737f62cb6e
fix doc
2020-08-07 18:08:51 +02:00
Christoph Walcher
e0a4988fcc
Lint against Self
as an arbitrary self type
...
Fixes #5861
2020-08-07 18:08:51 +02:00
Vadim Petrochenkov
a285b58368
Add some comments for magic numbers + Add tests
2020-08-06 22:55:26 +03:00
Vadim Petrochenkov
d642c3b6f8
Fix clippy
2020-08-06 22:13:11 +03:00
Christoph Walcher
0abc4833e5
Lint .min(x).max(y) with x < y
...
Fixes #5854
2020-08-06 02:56:07 +02:00
Eduardo Broto
50a86d4927
enable #[allow(clippy::unsafe_derive_deserialize)]
2020-08-06 00:45:30 +02:00
bors
2d4c3379d3
Auto merge of #5809 - JarredAllen:stable_sort_primitive, r=Manishearth
...
Stable sort primitive
changelog: Implements #5762
2020-08-05 20:41:21 +00:00
bors
2eab060ab7
Auto merge of #5859 - ebroto:5765_manual_async_fn_fp, r=yaahc
...
manual_async_fn: take input lifetimes into account
The anonymous future returned from an `async fn` captures all input
lifetimes. This was not being taken into account.
See https://github.com/rust-lang/rfcs/blob/master/text/2394-async_await.md#lifetime-capture-in-the-anonymous-future
changelog: Take input lifetimes into account in [`manual_async_fn`].
Fixes #5765
2020-08-05 17:52:28 +00:00
Takayuki Nakata
610d4e3c8b
rustfmt
2020-08-05 23:10:30 +09:00
Takayuki Nakata
e48685edef
Just check if it contains _
in for pat
2020-08-05 23:00:03 +09:00
Takayuki Nakata
228f668282
Use mutated_variables
2020-08-05 23:00:03 +09:00
Takayuki Nakata
b7ceb4d3d7
rustfmt
2020-08-05 23:00:03 +09:00
Takayuki Nakata
14a4e3bcc8
Fix a lint message
2020-08-05 22:59:12 +09:00