diff options
| author | tabokie <xy.tao@outlook.com> | 2022-08-01 13:22:16 +0800 |
|---|---|---|
| committer | tabokie <xy.tao@outlook.com> | 2022-08-01 13:22:20 +0800 |
| commit | e00ceb99cdee70a30ba15ff490f3c249495c9c03 (patch) | |
| tree | c85328af31ebdd2724b99724c888df957700e707 | |
| parent | a0ed68776e2f8177198982587bce6685410548d1 (diff) | |
| download | rust-e00ceb99cdee70a30ba15ff490f3c249495c9c03.tar.gz rust-e00ceb99cdee70a30ba15ff490f3c249495c9c03.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 cb33b3b3279..b9cc9fc1e85 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