Move semicolon_if_nothing_returned to pedantic
This commit is contained in:
@@ -1038,7 +1038,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
|||||||
LintId::of(panic_unimplemented::UNIMPLEMENTED),
|
LintId::of(panic_unimplemented::UNIMPLEMENTED),
|
||||||
LintId::of(panic_unimplemented::UNREACHABLE),
|
LintId::of(panic_unimplemented::UNREACHABLE),
|
||||||
LintId::of(pattern_type_mismatch::PATTERN_TYPE_MISMATCH),
|
LintId::of(pattern_type_mismatch::PATTERN_TYPE_MISMATCH),
|
||||||
LintId::of(semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED),
|
|
||||||
LintId::of(shadow::SHADOW_REUSE),
|
LintId::of(shadow::SHADOW_REUSE),
|
||||||
LintId::of(shadow::SHADOW_SAME),
|
LintId::of(shadow::SHADOW_SAME),
|
||||||
LintId::of(strings::STRING_ADD),
|
LintId::of(strings::STRING_ADD),
|
||||||
@@ -1129,6 +1128,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
|||||||
LintId::of(ranges::RANGE_PLUS_ONE),
|
LintId::of(ranges::RANGE_PLUS_ONE),
|
||||||
LintId::of(redundant_else::REDUNDANT_ELSE),
|
LintId::of(redundant_else::REDUNDANT_ELSE),
|
||||||
LintId::of(ref_option_ref::REF_OPTION_REF),
|
LintId::of(ref_option_ref::REF_OPTION_REF),
|
||||||
|
LintId::of(semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED),
|
||||||
LintId::of(shadow::SHADOW_UNRELATED),
|
LintId::of(shadow::SHADOW_UNRELATED),
|
||||||
LintId::of(strings::STRING_ADD_ASSIGN),
|
LintId::of(strings::STRING_ADD_ASSIGN),
|
||||||
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
|
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ use rustc_lint::{LateContext, LateLintPass};
|
|||||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||||
|
|
||||||
declare_clippy_lint! {
|
declare_clippy_lint! {
|
||||||
/// **What it does:** Looks for blocks of expressions and fires if the last expression returns `()`
|
/// **What it does:** Looks for blocks of expressions and fires if the last expression returns
|
||||||
/// but is not followed by a semicolon.
|
/// `()` but is not followed by a semicolon.
|
||||||
///
|
///
|
||||||
/// **Why is this bad?** The semicolon might be optional but when
|
/// **Why is this bad?** The semicolon might be optional but when extending the block with new
|
||||||
/// extending the block with new code, it doesn't require a change in previous last line.
|
/// code, it doesn't require a change in previous last line.
|
||||||
///
|
///
|
||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
@@ -30,7 +30,7 @@ declare_clippy_lint! {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub SEMICOLON_IF_NOTHING_RETURNED,
|
pub SEMICOLON_IF_NOTHING_RETURNED,
|
||||||
restriction,
|
pedantic,
|
||||||
"add a semicolon if nothing is returned"
|
"add a semicolon if nothing is returned"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user