Skip to content

Commit ac4d0f2

Browse files
committed
Update doctest
1 parent 09f0741 commit ac4d0f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/clippy/clippy_lints/src/doc/needless_doctest_main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{io, thread};
33

44
use crate::doc::{NEEDLESS_DOCTEST_MAIN, TEST_ATTR_IN_DOCTEST};
55
use clippy_utils::diagnostics::span_lint;
6-
use rustc_ast::{Async, Fn, FnRetTy, Item, ItemKind};
6+
use rustc_ast::{CoroutineKind, Fn, FnRetTy, Item, ItemKind};
77
use rustc_data_structures::sync::Lrc;
88
use rustc_errors::emitter::EmitterWriter;
99
use rustc_errors::Handler;
@@ -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.asyncness, Async::Yes { .. });
72+
let is_async = matches!(sig.header.coro_kind, CoroutineKind::Async { .. });
7373
let returns_nothing = match &sig.decl.output {
7474
FnRetTy::Default(..) => true,
7575
FnRetTy::Ty(ty) if ty.kind.is_unit() => true,

0 commit comments

Comments
 (0)