1
Fork 0

Merge commit 'd7b5cbf065' into clippyup

This commit is contained in:
flip1995 2022-06-16 17:39:06 +02:00
parent bd071bf5b2
commit f8f9d01c2a
199 changed files with 4158 additions and 1931 deletions

View file

@ -1,4 +1,4 @@
use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::diagnostics::span_lint_hir_and_then;
use clippy_utils::source::snippet;
use clippy_utils::ty::implements_trait;
use rustc_errors::Applicability;
@ -24,6 +24,7 @@ declare_clippy_lint! {
/// };
/// }
/// ```
///
/// Use instead:
/// ```rust
/// async fn foo() {}
@ -63,9 +64,10 @@ impl<'tcx> LateLintPass<'tcx> for AsyncYieldsAsync {
_ => None,
};
if let Some(return_expr_span) = return_expr_span {
span_lint_and_then(
span_lint_hir_and_then(
cx,
ASYNC_YIELDS_ASYNC,
body.value.hir_id,
return_expr_span,
"an async construct yields a type which is itself awaitable",
|db| {