diff options
| author | Eric Holk <ericholk@microsoft.com> | 2023-12-04 16:37:45 -0800 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2023-12-04 16:37:45 -0800 |
| commit | 594a5f18a7a77b5a76dfeae324c967575bede80b (patch) | |
| tree | 47702c1a08480512918e1034196c79c5f54223fa | |
| parent | c9eb8c9df603763abdc785531e1a6ecfaaca9501 (diff) | |
| download | rust-594a5f18a7a77b5a76dfeae324c967575bede80b.tar.gz rust-594a5f18a7a77b5a76dfeae324c967575bede80b.zip | |
Update doctest
| -rw-r--r-- | clippy_lints/src/doc/needless_doctest_main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/doc/needless_doctest_main.rs b/clippy_lints/src/doc/needless_doctest_main.rs index e50e83834c1..8079129f782 100644 --- a/clippy_lints/src/doc/needless_doctest_main.rs +++ b/clippy_lints/src/doc/needless_doctest_main.rs @@ -3,7 +3,7 @@ use std::{io, thread}; use crate::doc::{NEEDLESS_DOCTEST_MAIN, TEST_ATTR_IN_DOCTEST}; use clippy_utils::diagnostics::span_lint; -use rustc_ast::{Async, Fn, FnRetTy, Item, ItemKind}; +use rustc_ast::{CoroutineKind, Fn, FnRetTy, Item, ItemKind}; use rustc_data_structures::sync::Lrc; use rustc_errors::emitter::EmitterWriter; use rustc_errors::Handler; @@ -69,7 +69,7 @@ pub fn check( if !ignore { get_test_spans(&item, &mut test_attr_spans); } - let is_async = matches!(sig.header.asyncness, Async::Yes { .. }); + let is_async = matches!(sig.header.coro_kind, CoroutineKind::Async { .. }); let returns_nothing = match &sig.decl.output { FnRetTy::Default(..) => true, FnRetTy::Ty(ty) if ty.kind.is_unit() => true, |
