mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
rustc_hir_typeck: fix clippy
This commit is contained in:
parent
b78509e2f2
commit
059e52b96b
10 changed files with 17 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
use clippy_utils::diagnostics::span_lint_hir;
|
||||
use rustc_hir::intravisit;
|
||||
use rustc_hir::{self, AssocItemKind, Body, FnDecl, HirId, HirIdSet, Impl, ItemKind, Node, Pat, PatKind};
|
||||
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::mir::FakeReadCause;
|
||||
|
@ -178,7 +178,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
|
|||
|
||||
fn fake_read(
|
||||
&mut self,
|
||||
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: FakeReadCause,
|
||||
_: HirId,
|
||||
) {
|
||||
|
|
|
@ -32,6 +32,7 @@ extern crate rustc_driver;
|
|||
extern crate rustc_errors;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_hir_analysis;
|
||||
extern crate rustc_hir_typeck;
|
||||
extern crate rustc_hir_pretty;
|
||||
extern crate rustc_index;
|
||||
extern crate rustc_infer;
|
||||
|
|
|
@ -4,7 +4,7 @@ use clippy_utils::{get_enclosing_block, higher, path_to_local};
|
|||
use if_chain::if_chain;
|
||||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_hir::{BindingAnnotation, Expr, ExprKind, HirId, Node, PatKind};
|
||||
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::{mir::FakeReadCause, ty};
|
||||
|
@ -115,7 +115,7 @@ impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
|
|||
|
||||
fn fake_read(
|
||||
&mut self,
|
||||
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: FakeReadCause,
|
||||
_: HirId,
|
||||
) {
|
||||
|
|
|
@ -8,7 +8,7 @@ use clippy_utils::{fn_def_id, get_parent_expr, is_diag_item_method, is_diag_trai
|
|||
use clippy_utils::{meets_msrv, msrvs};
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::{def_id::DefId, BorrowKind, Expr, ExprKind, ItemKind, LangItem, Node};
|
||||
use rustc_hir_analysis::check::{FnCtxt, Inherited};
|
||||
use rustc_hir_typeck::{FnCtxt, Inherited};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::mir::Mutability;
|
||||
|
|
|
@ -12,7 +12,7 @@ use rustc_hir::{
|
|||
BindingAnnotation, Body, FnDecl, GenericArg, HirId, Impl, ItemKind, Mutability, Node, PatKind, QPath, TyKind,
|
||||
};
|
||||
use rustc_hir::{HirIdMap, HirIdSet};
|
||||
use rustc_hir_analysis::expr_use_visitor as euv;
|
||||
use rustc_hir_typeck::expr_use_visitor as euv;
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::mir::FakeReadCause;
|
||||
|
@ -342,7 +342,7 @@ impl<'tcx> euv::Delegate<'tcx> for MovedVariablesCtxt {
|
|||
|
||||
fn fake_read(
|
||||
&mut self,
|
||||
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: FakeReadCause,
|
||||
_: HirId,
|
||||
) {
|
||||
|
|
|
@ -8,7 +8,7 @@ use core::ops::ControlFlow;
|
|||
use if_chain::if_chain;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::mir::FakeReadCause;
|
||||
use rustc_middle::ty::BorrowKind;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_hir::Expr;
|
||||
use rustc_hir_analysis::check::{cast, FnCtxt, Inherited};
|
||||
use rustc_hir_typeck::{cast, FnCtxt, Inherited};
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::{cast::CastKind, Ty};
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
|
|
@ -24,7 +24,7 @@ extern crate rustc_attr;
|
|||
extern crate rustc_data_structures;
|
||||
extern crate rustc_errors;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_hir_analysis;
|
||||
extern crate rustc_hir_typeck;
|
||||
extern crate rustc_infer;
|
||||
extern crate rustc_lexer;
|
||||
extern crate rustc_lint;
|
||||
|
|
|
@ -10,7 +10,7 @@ use rustc_ast_pretty::pprust::token_kind_to_string;
|
|||
use rustc_errors::Applicability;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::{Closure, ExprKind, HirId, MutTy, TyKind};
|
||||
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{EarlyContext, LateContext, LintContext};
|
||||
use rustc_middle::hir::place::ProjectionKind;
|
||||
|
@ -1054,11 +1054,10 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
|
|||
|
||||
fn fake_read(
|
||||
&mut self,
|
||||
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: FakeReadCause,
|
||||
_: HirId,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc_hir as hir;
|
|||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_hir::HirIdSet;
|
||||
use rustc_hir::{Expr, ExprKind, HirId, Node};
|
||||
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
|
@ -75,11 +75,10 @@ impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
|
|||
|
||||
fn fake_read(
|
||||
&mut self,
|
||||
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
|
||||
_: FakeReadCause,
|
||||
_: HirId,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
}
|
||||
|
||||
pub struct ParamBindingIdCollector {
|
||||
|
|
Loading…
Reference in a new issue