Skip to content

Commit

Permalink
Auto merge of #98827 - aDotInTheVoid:suggest-extern-block, r=nagisa
Browse files Browse the repository at this point in the history
Suggest using block for `extern "abi" fn` with no body

`@rustbot` modify labels: +A-diagnostics
  • Loading branch information
bors committed Jul 7, 2022
2 parents e34ee24 + ab23b3a commit 5483a7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/excessive_bools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl ExcessiveBools {

fn check_fn_sig(&self, cx: &EarlyContext<'_>, fn_sig: &FnSig, span: Span) {
match fn_sig.header.ext {
Extern::Implicit | Extern::Explicit(_) => return,
Extern::Implicit(_) | Extern::Explicit(_, _) => return,
Extern::None => (),
}

Expand Down
4 changes: 2 additions & 2 deletions clippy_utils/src/ast_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ pub fn eq_ty(l: &Ty, r: &Ty) -> bool {
pub fn eq_ext(l: &Extern, r: &Extern) -> bool {
use Extern::*;
match (l, r) {
(None, None) | (Implicit, Implicit) => true,
(Explicit(l), Explicit(r)) => eq_str_lit(l, r),
(None, None) | (Implicit(_), Implicit(_)) => true,
(Explicit(l,_), Explicit(r,_)) => eq_str_lit(l, r),
_ => false,
}
}
Expand Down

0 comments on commit 5483a7d

Please sign in to comment.