mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 21:34:18 +00:00
Move semicolon_if_nothing_returned
to pedantic
This commit is contained in:
parent
a248648862
commit
1ac7e19b4c
@ -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::UNREACHABLE),
|
||||
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_SAME),
|
||||
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(redundant_else::REDUNDANT_ELSE),
|
||||
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(strings::STRING_ADD_ASSIGN),
|
||||
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};
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What it does:** Looks for blocks of expressions and fires if the last expression returns `()`
|
||||
/// but is not followed by a semicolon.
|
||||
/// **What it does:** Looks for blocks of expressions and fires if the last expression returns
|
||||
/// `()` but is not followed by a semicolon.
|
||||
///
|
||||
/// **Why is this bad?** The semicolon might be optional but when
|
||||
/// extending the block with new code, it doesn't require a change in previous last line.
|
||||
/// **Why is this bad?** The semicolon might be optional but when extending the block with new
|
||||
/// code, it doesn't require a change in previous last line.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
@ -30,7 +30,7 @@ declare_clippy_lint! {
|
||||
/// }
|
||||
/// ```
|
||||
pub SEMICOLON_IF_NOTHING_RETURNED,
|
||||
restriction,
|
||||
pedantic,
|
||||
"add a semicolon if nothing is returned"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user