Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move semicolon_if_nothing_returned lint to pedantic #7148

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,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 @@ -1395,6 +1394,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