Skip to content

Commit 2378916

Browse files
committed
further simplify
1 parent 5682ab0 commit 2378916

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/builtin_macros/src/syntax.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5008,8 +5008,8 @@ pub(crate) fn sig_specs_attr(
50085008
spec_stmts.extend(take_sig_with_spec(erase_ghost, with, sig, &mut ret_pat));
50095009
}
50105010
spec.with = None;
5011-
let (ret_pat, ret_ty) = match (&ret_pat, &sig.output) {
5012-
(Some(pat), syn::ReturnType::Type(_, ty)) => (Some(pat), Some(ty.as_ref())),
5011+
let (ret_pat, ret_ty) = match (ret_pat, &sig.output) {
5012+
(Some(pat), syn::ReturnType::Type(_, ty)) => (Some(pat), Some(ty)),
50135013
_ => (None, None),
50145014
};
50155015
let mut visitor = Visitor {
@@ -5024,7 +5024,7 @@ pub(crate) fn sig_specs_attr(
50245024
rustdoc: env_rustdoc(),
50255025
};
50265026

5027-
if let Some(pat) = ret_pat {
5027+
if let Some(pat) = &ret_pat {
50285028
if let Some(err_stmt) = check_return_idents(pat, &sig.inputs) {
50295029
spec_stmts.push(err_stmt);
50305030
}
@@ -5033,8 +5033,8 @@ pub(crate) fn sig_specs_attr(
50335033
let sig_span = sig.span().clone();
50345034
spec_stmts.extend(visitor.take_sig_specs(
50355035
&mut spec,
5036-
ret_pat,
5037-
ret_ty,
5036+
ret_pat.as_ref(),
5037+
ret_ty.as_ref(),
50385038
sig_span,
50395039
is_impl_fn,
50405040
is_closure,

0 commit comments

Comments
 (0)