Skip to content

Commit

Permalink
Fix rebase fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jun 7, 2020
1 parent ecabed6 commit a9ca832
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
19 changes: 7 additions & 12 deletions clippy_lints/src/await_holding_lock.rs
Expand Up @@ -54,18 +54,13 @@ declare_lint_pass!(AwaitHoldingLock => [AWAIT_HOLDING_LOCK]);
impl LateLintPass<'_, '_> for AwaitHoldingLock {
fn check_body(&mut self, cx: &LateContext<'_, '_>, body: &'_ Body<'_>) {
use AsyncGeneratorKind::{Block, Closure, Fn};
match body.generator_kind {
Some(GeneratorKind::Async(Block))
| Some(GeneratorKind::Async(Closure))
| Some(GeneratorKind::Async(Fn)) => {
let body_id = BodyId {
hir_id: body.value.hir_id,
};
let def_id = cx.tcx.hir().body_owner_def_id(body_id);
let tables = cx.tcx.typeck_tables_of(def_id);
check_interior_types(cx, &tables.generator_interior_types, body.value.span);
},
_ => {},
if let Some(GeneratorKind::Async(Block | Closure | Fn)) = body.generator_kind {
let body_id = BodyId {
hir_id: body.value.hir_id,
};
let def_id = cx.tcx.hir().body_owner_def_id(body_id);
let tables = cx.tcx.typeck_tables_of(def_id);
check_interior_types(cx, &tables.generator_interior_types, body.value.span);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions clippy_lints/src/utils/ast_utils.rs
Expand Up @@ -7,6 +7,7 @@
use crate::utils::{both, over};
use rustc_ast::ast::{self, *};
use rustc_ast::ptr::P;
use rustc_span::symbol::Ident;
use std::mem;

/// Checks if each element in the first slice is contained within the latter as per `eq_fn`.
Expand Down

0 comments on commit a9ca832

Please sign in to comment.