Remove unused functions from ast CoroutineKind
This commit is contained in:
parent
c8f5136fe8
commit
1c2e9f8775
@ -221,7 +221,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
|
|||||||
) => {
|
) => {
|
||||||
eq_closure_binder(lb, rb)
|
eq_closure_binder(lb, rb)
|
||||||
&& lc == rc
|
&& lc == rc
|
||||||
&& la.map_or(false, CoroutineKind::is_async) == ra.map_or(false, CoroutineKind::is_async)
|
&& eq_coroutine_kind(*la, *ra)
|
||||||
&& lm == rm
|
&& lm == rm
|
||||||
&& eq_fn_decl(lf, rf)
|
&& eq_fn_decl(lf, rf)
|
||||||
&& eq_expr(le, re)
|
&& eq_expr(le, re)
|
||||||
@ -241,6 +241,16 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn eq_coroutine_kind(a: Option<CoroutineKind>, b: Option<CoroutineKind>) -> bool {
|
||||||
|
match (a, b) {
|
||||||
|
(Some(CoroutineKind::Async { .. }), Some(CoroutineKind::Async { .. }))
|
||||||
|
| (Some(CoroutineKind::Gen { .. }), Some(CoroutineKind::Gen { .. }))
|
||||||
|
| (Some(CoroutineKind::AsyncGen { .. }), Some(CoroutineKind::AsyncGen { .. }))
|
||||||
|
| (None, None) => true,
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn eq_field(l: &ExprField, r: &ExprField) -> bool {
|
pub fn eq_field(l: &ExprField, r: &ExprField) -> bool {
|
||||||
l.is_placeholder == r.is_placeholder
|
l.is_placeholder == r.is_placeholder
|
||||||
&& eq_id(l.ident, r.ident)
|
&& eq_id(l.ident, r.ident)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user