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 | b608ec8f4185b150d43db870cd153c3c836a15a5 (patch) | |
| tree | 1c1074b9cd6adac3264d23df83e93362950e1f38 | |
| parent | 9538d2d0f1c708affa36ef8917729efec2e5e0ed (diff) | |
| download | rust-b608ec8f4185b150d43db870cd153c3c836a15a5.tar.gz rust-b608ec8f4185b150d43db870cd153c3c836a15a5.zip | |
move [`assertions_on_result_states`] to restriction
Signed-off-by: tabokie <xy.tao@outlook.com>
4 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/clippy/clippy_lints/src/assertions_on_result_states.rs b/src/tools/clippy/clippy_lints/src/assertions_on_result_states.rs index b6affdee523..4caab623090 100644 --- a/src/tools/clippy/clippy_lints/src/assertions_on_result_states.rs +++ b/src/tools/clippy/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/src/tools/clippy/clippy_lints/src/lib.register_all.rs b/src/tools/clippy/clippy_lints/src/lib.register_all.rs index 5be1c417bf8..0ba9b7ae7e5 100644 --- a/src/tools/clippy/clippy_lints/src/lib.register_all.rs +++ b/src/tools/clippy/clippy_lints/src/lib.register_all.rs @@ -6,7 +6,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec