Rustup
This commit is contained in:
parent
2f62d803ab
commit
d011dae96d
7 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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(..) |
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue