diff options
| author | tabokie <xy.tao@outlook.com> | 2022-08-01 13:22:16 +0800 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-08-02 10:13:51 +0200 |
| commit | 2fcaac79bcaf6b100172d9b5b932790923dcc97f (patch) | |
| tree | 3ef9cc46a5514093bd6b38b0eef15372d3e78899 | |
| parent | 119247ad3274ee0f38a0f5454c6e5235dbb6eecf (diff) | |
| download | rust-2fcaac79bcaf6b100172d9b5b932790923dcc97f.tar.gz rust-2fcaac79bcaf6b100172d9b5b932790923dcc97f.zip | |
move [`assertions_on_result_states`] to restriction
Signed-off-by: tabokie <xy.tao@outlook.com>
| -rw-r--r-- | clippy_lints/src/assertions_on_result_states.rs | 5 | ||||
| -rw-r--r-- | clippy_lints/src/lib.register_all.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/lib.register_restriction.rs | 1 | ||||
| -rw-r--r-- | clippy_lints/src/lib.register_style.rs | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/clippy_lints/src/assertions_on_result_states.rs b/clippy_lints/src/assertions_on_result_states.rs index b6affdee523..4caab623090 100644 --- a/clippy_lints/src/assertions_on_result_states.rs +++ b/clippy_lints/src/assertions_on_result_states.rs @@ -19,6 +19,9 @@ declare_clippy_lint! { /// ### Why is this bad? /// An assertion failure cannot output an useful message of the error. /// + /// ### Known problems + /// The suggested replacement decreases the readability of code and log output. + /// /// ### Example /// ```rust,ignore /// # let r = Ok::<_, ()>(()); @@ -28,7 +31,7 @@ declare_clippy_lint! { /// ``` #[clippy::version = "1.64.0"] pub ASSERTIONS_ON_RESULT_STATES, - style, + restriction, "`assert!(r.is_ok())`/`assert!(r.is_err())` gives worse error message than directly calling `r.unwrap()`/`r.unwrap_err()`" } diff --git a/clippy_lints/src/lib.register_all.rs b/clippy_lints/src/lib.register_all.rs index 5be1c417bf8..0ba9b7ae7e5 100644 --- a/clippy_lints/src/lib.register_all.rs +++ b/clippy_lints/src/lib.register_all.rs @@ -6,7 +6,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec