Rollup merge of #100053 - flip1995:clippy_backport, r=xFrednet
move [`assertions_on_result_states`] to restriction "Backports" the first commit of https://github.com/rust-lang/rust-clippy/pull/9273, so that the lint doesn't go into beta as a warn-by-default lint. The other changes in the linked PR can ride the train as usual. r? ``@xFrednet`` (only Clippy changes, so we don't need to bother compiler people) --- For Clippy: changelog: none
This commit is contained in:
commit
7aaeee734f
@ -19,6 +19,9 @@
|
||||
/// ### 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 @@
|
||||
/// ```
|
||||
#[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()`"
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
LintId::of(almost_complete_letter_range::ALMOST_COMPLETE_LETTER_RANGE),
|
||||
LintId::of(approx_const::APPROX_CONSTANT),
|
||||
LintId::of(assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
|
||||
LintId::of(assertions_on_result_states::ASSERTIONS_ON_RESULT_STATES),
|
||||
LintId::of(async_yields_async::ASYNC_YIELDS_ASYNC),
|
||||
LintId::of(attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
|
||||
LintId::of(attrs::DEPRECATED_CFG_ATTR),
|
||||
|
@ -7,6 +7,7 @@
|
||||
LintId::of(as_underscore::AS_UNDERSCORE),
|
||||
LintId::of(asm_syntax::INLINE_ASM_X86_ATT_SYNTAX),
|
||||
LintId::of(asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX),
|
||||
LintId::of(assertions_on_result_states::ASSERTIONS_ON_RESULT_STATES),
|
||||
LintId::of(attrs::ALLOW_ATTRIBUTES_WITHOUT_REASON),
|
||||
LintId::of(casts::FN_TO_NUMERIC_CAST_ANY),
|
||||
LintId::of(create_dir::CREATE_DIR),
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
store.register_group(true, "clippy::style", Some("clippy_style"), vec![
|
||||
LintId::of(assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
|
||||
LintId::of(assertions_on_result_states::ASSERTIONS_ON_RESULT_STATES),
|
||||
LintId::of(blacklisted_name::BLACKLISTED_NAME),
|
||||
LintId::of(blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
|
||||
LintId::of(bool_assert_comparison::BOOL_ASSERT_COMPARISON),
|
||||
|
Loading…
Reference in New Issue
Block a user