1
Fork 0

Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errors

Remove needless returns detected by clippy in the compiler
This commit is contained in:
Jubilee 2024-09-11 15:53:22 -07:00 committed by GitHub
commit a31a8fe0cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 66 additions and 75 deletions

View file

@ -1905,10 +1905,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|| (int_reprs == 1
&& is_c
&& item.is_some_and(|item| {
if let ItemLike::Item(item) = item {
return is_c_like_enum(item);
}
return false;
if let ItemLike::Item(item) = item { is_c_like_enum(item) } else { false }
}))
{
self.tcx.emit_node_span_lint(

View file

@ -394,7 +394,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
}
}
return false;
false
}
fn visit_node(&mut self, node: Node<'tcx>) {