Skip to content

Commit

Permalink
Move semicolon_if_nothing_returned to pedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
mbartlett21 committed May 24, 2021
1 parent a248648 commit 1ac7e19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down
10 changes: 5 additions & 5 deletions clippy_lints/src/semicolon_if_nothing_returned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand All @@ -30,7 +30,7 @@ declare_clippy_lint! {
/// }
/// ```
pub SEMICOLON_IF_NOTHING_RETURNED,
restriction,
pedantic,
"add a semicolon if nothing is returned"
}

Expand Down

0 comments on commit 1ac7e19

Please sign in to comment.