David Tolnay
4a97386cb9
Clippy if_then_panic lint has been renamed to manual_assert
2021-11-04 19:57:14 -07:00
David Tolnay
5c785eee58
Ignore if_then_panic clippy lint
...
error: only a `panic!` in `if`-then statement
--> serde_derive/src/internals/ctxt.rs:58:9
|
58 | / if !thread::panicking() && self.errors.borrow().is_some() {
59 | | panic!("forgot to check for errors");
60 | | }
| |_________^ help: try: `assert!(!!thread::panicking() && self.errors.borrow().is_some(), "forgot to check for errors");`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:9
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::if_then_panic)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:73:5
|
73 | / if ser.remaining() > 0 {
74 | | panic!("{} remaining tokens", ser.remaining());
75 | | }
| |_____^ help: try: `assert!(!ser.remaining() > 0, "{} remaining tokens", ser.remaining());`
|
note: the lint level is defined here
--> serde_test/src/lib.rs:149:44
|
149 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
| ^^^^^^
= note: `#[deny(clippy::if_then_panic)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:126:5
|
126 | / if ser.remaining() > 0 {
127 | | panic!("{} remaining tokens", ser.remaining());
128 | | }
| |_____^ help: try: `assert!(!ser.remaining() > 0, "{} remaining tokens", ser.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:166:5
|
166 | / if de.remaining() > 0 {
167 | | panic!("{} remaining tokens", de.remaining());
168 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:180:5
|
180 | / if de.remaining() > 0 {
181 | | panic!("{} remaining tokens", de.remaining());
182 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:220:5
|
220 | / if de.remaining() > 0 {
221 | | panic!("{} remaining tokens", de.remaining());
222 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> test_suite/tests/test_de.rs:1349:9
|
1349 | / if de.remaining() > 0 {
1350 | | panic!("{} remaining tokens", de.remaining());
1351 | | }
| |_________^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= note: `-D clippy::if-then-panic` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
2021-09-30 00:31:49 -04:00
David Tolnay
65e1a50749
Release 1.0.130
2021-08-28 11:31:38 -07:00
David Tolnay
2b92c80cc1
Release 1.0.129
2021-08-23 15:01:24 -07:00
David Tolnay
a587eb8953
Release 1.0.128
2021-08-21 10:39:32 -07:00
David Tolnay
f309485787
Ignore buggy collapsible_match clippy lint
...
https://github.com/rust-lang/rust-clippy/issues/7575
2021-08-16 19:32:10 -07:00
David Tolnay
e2f85681fe
Release 1.0.127
2021-07-30 20:59:13 -07:00
David Tolnay
d9c338ec4a
Release 1.0.126
2021-05-12 10:18:26 -07:00
David Tolnay
1120e5af4a
Remove suppression of removed clippy lint
...
warning: lint `clippy::filter_map` has been removed: this lint has been replaced by `manual_filter_map`, a more specific lint
--> serde_derive/src/lib.rs:42:5
|
42 | clippy::filter_map,
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
warning: lint `clippy::filter_map` has been removed: this lint has been replaced by `manual_filter_map`, a more specific lint
--> serde_derive/src/lib.rs:42:5
|
42 | clippy::filter_map,
| ^^^^^^^^^^^^^^^^^^
2021-04-24 19:23:56 -07:00
David Tolnay
6c3bf7a2fc
Ignore poor suggestion from branches_sharing_code lint
...
https://github.com/rust-lang/rust-clippy/issues/7054
error: all if blocks contain the same code at the end
--> serde_derive/src/de.rs:2160:5
|
2160 | / &fallthrough_arm_tokens
2161 | | };
| |_____^
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:9
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::branches_sharing_code)]` implied by `#[deny(clippy::all)]`
= note: The end suggestion probably needs some adjustments to use the expression result correctly
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
help: consider moving the end statements out like this
|
2160 | }
2161 | &fallthrough_arm_tokens;
|
2021-04-08 20:08:42 -07:00
David Tolnay
ce0844b9ec
Suppress match_wildcard_for_single_variants clippy false positive
...
https://github.com/rust-lang/rust-clippy/issues/6984
error: wildcard matches only a single variant and will also match any future added variants
--> serde_derive/src/internals/attr.rs:1918:9
|
1918 | _ => {}
| ^ help: try this: `syn::Type::__TestExhaustive(_)`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:22
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::match_wildcard_for_single_variants)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
error: wildcard matches only a single variant and will also match any future added variants
--> serde_derive/src/internals/receiver.rs:153:13
|
153 | _ => {}
| ^ help: try this: `Type::__TestExhaustive(_)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
error: wildcard matches only a single variant and will also match any future added variants
--> serde_derive/src/bound.rs:190:17
|
190 | _ => {}
| ^ help: try this: `syn::Type::__TestExhaustive(_)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
2021-03-26 23:30:15 -04:00
David Tolnay
e9270e59f0
Release 1.0.125
2021-03-22 16:15:57 -07:00
David Tolnay
5a8dcac2ed
Release 1.0.124
2021-03-05 19:55:40 -08:00
David Tolnay
c261015325
Ignore incorrect suggestion from manual_map lint
...
https://github.com/rust-lang/rust-clippy/issues/6797
error[E0382]: use of partially moved value: `self`
--> serde_derive/src/internals/attr.rs:71:24
|
71 | self.value.map(|value| (self.tokens, value))
| ----^^^^^^^----------------------
| | | |
| | | use occurs due to use in closure
| | value used here after partial move
| `self.value` partially moved due to this method call
|
note: this function takes ownership of the receiver `self`, which moves `self.value`
--> /home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:485:38
|
485 | pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
| ^^^^
= note: partial move occurs because `self.value` has type `std::option::Option<T>`, which does not implement the `Copy` trait
2021-02-25 20:53:45 -08:00
David Tolnay
6b5e5a83d0
Ignore let_underscore_drop pedantic clippy lint
2021-02-18 19:31:39 -08:00
David Tolnay
3d6c4149b1
Release 1.0.123
2021-01-25 13:43:11 -08:00
David Tolnay
2ba97394fb
Substitute Self in output of Serialize derive
2021-01-25 13:34:09 -08:00
David Tolnay
6c5bf701be
Merge pull request 1830 from taiki-e/self
2021-01-24 23:05:51 -08:00
David Tolnay
ffed19243d
Release 1.0.122
2021-01-24 16:17:29 -08:00
David Tolnay
6ea446fb4b
Suppress clippy unused_self pedantic lint
...
This usage is fine. It's mirroring trait signatures in syn::visit::Visit.
error: unused `self` argument
--> serde_derive/src/bound.rs:241:24
|
241 | fn visit_macro(&mut self, _mac: &'ast syn::Macro) {}
| ^^^^^^^^^
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:22
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::unused_self)]` implied by `#[deny(clippy::pedantic)]`
= help: consider refactoring to a associated function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
2021-01-24 16:01:05 -08:00
Taiki Endo
c67017d466
Fix handling of Self keyword in type definition
2021-01-24 15:23:51 +09:00
David Tolnay
bd588db067
Release 1.0.121
2021-01-23 13:17:08 -08:00
David Tolnay
398fba9b1e
Release 1.0.120
2021-01-18 22:55:13 -08:00
David Tolnay
4c89cf89fd
Release 1.0.119
2021-01-11 12:13:57 -08:00
David Tolnay
e797431268
Release 1.0.118
2020-12-05 13:45:47 -08:00
David Tolnay
fc3f104c4a
Release 1.0.117
2020-10-15 09:49:03 -07:00
David Tolnay
be7d0e7eb2
Ignore map_err_ignore Clippy pedantic lint
2020-09-25 21:55:59 -04:00
David Tolnay
b539cb45d7
Release 1.0.116
2020-09-11 11:56:19 -07:00
David Tolnay
2ef60b62ac
Release 1.0.115
2020-08-10 15:51:19 -07:00
David Tolnay
53b9871b17
Quote no longer requires high recursion
2020-07-16 10:49:16 -07:00
David Tolnay
f8787c3ca8
Suppress match_like_matches_macro clippy lint
2020-07-14 18:57:26 -07:00
David Tolnay
3022064f84
Suppress option_if_let_else clippy pedantic lint
2020-07-14 18:57:24 -07:00
David Tolnay
9c6f0c3a0e
Release 1.0.114
2020-06-21 17:31:02 -07:00
David Tolnay
7350b58f5c
Release 1.0.113
2020-06-19 13:31:38 -07:00
David Tolnay
f3520e526b
Release 1.0.112
2020-06-14 11:16:04 -07:00
David Tolnay
95b1a5d3d9
Ignore unnested_or_patterns suggesting unstable code
...
Clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704
2020-06-10 19:41:16 -07:00
David Tolnay
9f331cc257
Release 1.0.111
2020-05-29 18:53:07 -07:00
David Tolnay
078b171c1b
Release 1.0.110
2020-05-09 23:06:56 -07:00
David Tolnay
b97a183e82
Release 1.0.109
2020-05-09 21:00:51 -07:00
David Tolnay
ea2789df0f
Release 1.0.108
2020-05-09 17:53:23 -07:00
David Tolnay
f63acb52dc
Release 1.0.107
2020-05-08 15:45:36 -07:00
David Tolnay
b6def5300a
Resolve redundant_field_names lint in serde_derive
2020-04-05 21:07:52 -07:00
David Tolnay
1b35c9e27e
Update serde_derive to tool attrs
2020-04-05 21:00:58 -07:00
David Tolnay
d1564525ad
Release 1.0.106
2020-04-03 14:26:42 -07:00
David Tolnay
69653a762d
Release 1.0.105
2020-03-18 11:42:51 -07:00
David Tolnay
27c283ab53
Suppress wildcard import pedantic lints
2020-02-26 21:00:12 -08:00
David Tolnay
142955b109
Ignore struct_excessive_bools pedantic lint
2020-02-12 19:34:14 -08:00
David Tolnay
dfa321a1dd
Ignore wildcard_in_or_patterns lint
2020-01-14 20:31:03 -08:00
David Tolnay
234fbfd7e3
Release 1.0.104
2019-12-15 20:01:04 -08:00
David Tolnay
43a9f59c18
Release 1.0.103
2019-11-24 16:15:13 -08:00