mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 18:28:40 +00:00
Changes for rust-nightly after #27856
This commit is contained in:
parent
6df102cdab
commit
92db00863f
3 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ use rustc::lint::*;
|
|||
use syntax::ast::*;
|
||||
use syntax::ptr::P;
|
||||
use syntax::codemap::{Span, Spanned};
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc::middle::ty::{self, MethodTraitItemId, ImplOrTraitItemId};
|
||||
|
||||
use utils::{span_lint, walk_ptrs_ty, snippet};
|
||||
|
|
|
@ -22,7 +22,7 @@ impl LintPass for TopLevelRefPass {
|
|||
}
|
||||
|
||||
fn check_fn(&mut self, cx: &Context, k: FnKind, decl: &FnDecl, _: &Block, _: Span, _: NodeId) {
|
||||
if let FnKind::FkFnBlock = k {
|
||||
if let FnKind::FkClosure = k {
|
||||
// Does not apply to closures
|
||||
return
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ use rustc::lint::*;
|
|||
use syntax::ast::*;
|
||||
use syntax::codemap::{ExpnInfo, Span};
|
||||
use rustc::ast_map::Node::NodeExpr;
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc::middle::ty;
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
Loading…
Reference in a new issue