This commit is contained in:
Oliver Schneider 2018-01-15 12:07:38 +01:00
parent 2f62d803ab
commit d011dae96d
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
7 changed files with 9 additions and 9 deletions

View file

@ -86,7 +86,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
use rustc::hir::map::Node::*;
let is_impl = if let Some(NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent_node(nodeid)) {
matches!(item.node, hir::ItemImpl(_, _, _, _, Some(_), _, _) | hir::ItemAutoImpl(..))
matches!(item.node, hir::ItemImpl(_, _, _, _, Some(_), _, _))
} else {
false
};

View file

@ -143,7 +143,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
hir::ItemGlobalAsm(..) => "an assembly blob",
hir::ItemTy(..) => "a type alias",
hir::ItemUnion(..) => "a union",
hir::ItemAutoImpl(..) |
hir::ItemExternCrate(..) |
hir::ItemForeignMod(..) |
hir::ItemImpl(..) |

View file

@ -87,7 +87,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
// Exclude non-inherent impls
if let Some(NodeItem(item)) = cx.tcx.hir.find(cx.tcx.hir.get_parent_node(node_id)) {
if matches!(item.node, ItemImpl(_, _, _, _, Some(_), _, _) | ItemAutoImpl(..) |
if matches!(item.node, ItemImpl(_, _, _, _, Some(_), _, _) |
ItemTrait(..))
{
return;

View file

@ -406,9 +406,6 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
hir::ItemTraitAlias(..) => {
println!("trait alias");
}
hir::ItemAutoImpl(_, ref _trait_ref) => {
println!("auto impl");
},
hir::ItemImpl(_, _, _, _, Some(ref _trait_ref), _, _) => {
println!("trait impl");
},