fmt
This commit is contained in:
parent
4a6914bb8c
commit
e3619a6507
@ -107,11 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
|
|||||||
span: Span,
|
span: Span,
|
||||||
hir_id: hir::HirId,
|
hir_id: hir::HirId,
|
||||||
) {
|
) {
|
||||||
let is_impl = if let Some(hir::Node::Item(item)) = cx
|
let is_impl = if let Some(hir::Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
|
||||||
.tcx
|
|
||||||
.hir()
|
|
||||||
.find(cx.tcx.hir().get_parent_node(hir_id))
|
|
||||||
{
|
|
||||||
matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
|
matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
@ -88,11 +88,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exclude non-inherent impls
|
// Exclude non-inherent impls
|
||||||
if let Some(Node::Item(item)) = cx
|
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
|
||||||
.tcx
|
|
||||||
.hir()
|
|
||||||
.find(cx.tcx.hir().get_parent_node(hir_id))
|
|
||||||
{
|
|
||||||
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
|
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
|
||||||
ItemKind::Trait(..))
|
ItemKind::Trait(..))
|
||||||
{
|
{
|
||||||
|
@ -179,11 +179,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exclude non-inherent impls
|
// Exclude non-inherent impls
|
||||||
if let Some(Node::Item(item)) = cx
|
if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
|
||||||
.tcx
|
|
||||||
.hir()
|
|
||||||
.find(cx.tcx.hir().get_parent_node(hir_id))
|
|
||||||
{
|
|
||||||
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
|
if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
|
||||||
ItemKind::Trait(..))
|
ItemKind::Trait(..))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user