Replace some then
s with some then_some
s
This commit is contained in:
parent
8751fa1a9a
commit
5bf6a46032
24 changed files with 27 additions and 26 deletions
|
@ -204,7 +204,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) {
|
|||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id.expect_local());
|
||||
match tcx.hir().find(hir_id) {
|
||||
Some(Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. })) => {
|
||||
generics.params.is_empty().not().then(|| generics.span)
|
||||
generics.params.is_empty().not().then_some(generics.span)
|
||||
}
|
||||
_ => {
|
||||
span_bug!(tcx.def_span(def_id), "main has a non-function type");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue