Skip to content

Commit 1512d37

Browse files
coro_kind -> coroutine_kind
1 parent 5f191ce commit 1512d37

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/doc/needless_doctest_main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn check(
6969
if !ignore {
7070
get_test_spans(&item, &mut test_attr_spans);
7171
}
72-
let is_async = matches!(sig.header.coro_kind, Some(CoroutineKind::Async { .. }));
72+
let is_async = matches!(sig.header.coroutine_kind, Some(CoroutineKind::Async { .. }));
7373
let returns_nothing = match &sig.decl.output {
7474
FnRetTy::Default(..) => true,
7575
FnRetTy::Ty(ty) if ty.kind.is_unit() => true,

clippy_utils/src/ast_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
188188
Closure(box ast::Closure {
189189
binder: lb,
190190
capture_clause: lc,
191-
coro_kind: la,
191+
coroutine_kind: la,
192192
movability: lm,
193193
fn_decl: lf,
194194
body: le,
@@ -197,7 +197,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
197197
Closure(box ast::Closure {
198198
binder: rb,
199199
capture_clause: rc,
200-
coro_kind: ra,
200+
coroutine_kind: ra,
201201
movability: rm,
202202
fn_decl: rf,
203203
body: re,
@@ -563,7 +563,7 @@ pub fn eq_fn_sig(l: &FnSig, r: &FnSig) -> bool {
563563
eq_fn_decl(&l.decl, &r.decl) && eq_fn_header(&l.header, &r.header)
564564
}
565565

566-
fn eq_opt_coro_kind(l: Option<CoroutineKind>, r: Option<CoroutineKind>) -> bool {
566+
fn eq_opt_coroutine_kind(l: Option<CoroutineKind>, r: Option<CoroutineKind>) -> bool {
567567
match (l, r) {
568568
(Some(CoroutineKind::Async { .. }), Some(CoroutineKind::Async { .. }))
569569
| (Some(CoroutineKind::Gen { .. }), Some(CoroutineKind::Gen { .. })) => true,
@@ -574,7 +574,7 @@ fn eq_opt_coro_kind(l: Option<CoroutineKind>, r: Option<CoroutineKind>) -> bool
574574

575575
pub fn eq_fn_header(l: &FnHeader, r: &FnHeader) -> bool {
576576
matches!(l.unsafety, Unsafe::No) == matches!(r.unsafety, Unsafe::No)
577-
&& eq_opt_coro_kind(l.coro_kind, r.coro_kind)
577+
&& eq_opt_coroutine_kind(l.coroutine_kind, r.coroutine_kind)
578578
&& matches!(l.constness, Const::No) == matches!(r.constness, Const::No)
579579
&& eq_ext(&l.ext, &r.ext)
580580
}

0 commit comments

Comments
 (0)