Skip to content

Commit 384a49e

Browse files
Rename some more coro_kind -> coroutine_kind
1 parent d5dcd85 commit 384a49e

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1271,11 +1271,11 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
12711271
// Functions cannot both be `const async` or `const gen`
12721272
if let Some(&FnHeader {
12731273
constness: Const::Yes(cspan),
1274-
coroutine_kind: Some(coro_kind),
1274+
coroutine_kind: Some(coroutine_kind),
12751275
..
12761276
}) = fk.header()
12771277
{
1278-
let aspan = match coro_kind {
1278+
let aspan = match coroutine_kind {
12791279
CoroutineKind::Async { span: aspan, .. }
12801280
| CoroutineKind::Gen { span: aspan, .. }
12811281
| CoroutineKind::AsyncGen { span: aspan, .. } => aspan,

compiler/rustc_builtin_macros/src/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ fn check_test_signature(
541541
return Err(sd.emit_err(errors::TestBadFn { span: i.span, cause: span, kind: "unsafe" }));
542542
}
543543

544-
if let Some(coro_kind) = f.sig.header.coroutine_kind {
545-
match coro_kind {
544+
if let Some(coroutine_kind) = f.sig.header.coroutine_kind {
545+
match coroutine_kind {
546546
ast::CoroutineKind::Async { span, .. } => {
547547
return Err(sd.emit_err(errors::TestBadFn {
548548
span: i.span,

compiler/rustc_lint/src/early.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
162162
// Explicitly check for lints associated with 'closure_id', since
163163
// it does not have a corresponding AST node
164164
if let ast_visit::FnKind::Fn(_, _, sig, _, _, _) = fk {
165-
if let Some(coro_kind) = sig.header.coroutine_kind {
166-
self.check_id(coro_kind.closure_id());
165+
if let Some(coroutine_kind) = sig.header.coroutine_kind {
166+
self.check_id(coroutine_kind.closure_id());
167167
}
168168
}
169169
}
@@ -223,9 +223,10 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
223223
// it does not have a corresponding AST node
224224
match e.kind {
225225
ast::ExprKind::Closure(box ast::Closure {
226-
coroutine_kind: Some(coro_kind), ..
226+
coroutine_kind: Some(coroutine_kind),
227+
..
227228
}) => {
228-
self.check_id(coro_kind.closure_id());
229+
self.check_id(coroutine_kind.closure_id());
229230
}
230231
_ => {}
231232
}

0 commit comments

Comments
 (0)