Skip to content

Commit b076f03

Browse files
committed
rustc_hir_typeck: fix clippy
1 parent fb3ab13 commit b076f03

File tree

10 files changed

+17
-18
lines changed

10 files changed

+17
-18
lines changed

Diff for: src/tools/clippy/clippy_lints/src/escape.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clippy_utils::diagnostics::span_lint_hir;
22
use rustc_hir::intravisit;
33
use rustc_hir::{self, AssocItemKind, Body, FnDecl, HirId, HirIdSet, Impl, ItemKind, Node, Pat, PatKind};
4-
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
4+
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
55
use rustc_infer::infer::TyCtxtInferExt;
66
use rustc_lint::{LateContext, LateLintPass};
77
use rustc_middle::mir::FakeReadCause;
@@ -178,7 +178,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
178178

179179
fn fake_read(
180180
&mut self,
181-
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
181+
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
182182
_: FakeReadCause,
183183
_: HirId,
184184
) {

Diff for: src/tools/clippy/clippy_lints/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extern crate rustc_driver;
3232
extern crate rustc_errors;
3333
extern crate rustc_hir;
3434
extern crate rustc_hir_analysis;
35+
extern crate rustc_hir_typeck;
3536
extern crate rustc_hir_pretty;
3637
extern crate rustc_index;
3738
extern crate rustc_infer;

Diff for: src/tools/clippy/clippy_lints/src/loops/mut_range_bound.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use clippy_utils::{get_enclosing_block, higher, path_to_local};
44
use if_chain::if_chain;
55
use rustc_hir::intravisit::{self, Visitor};
66
use rustc_hir::{BindingAnnotation, Expr, ExprKind, HirId, Node, PatKind};
7-
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
7+
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
88
use rustc_infer::infer::TyCtxtInferExt;
99
use rustc_lint::LateContext;
1010
use rustc_middle::{mir::FakeReadCause, ty};
@@ -115,7 +115,7 @@ impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
115115

116116
fn fake_read(
117117
&mut self,
118-
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
118+
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
119119
_: FakeReadCause,
120120
_: HirId,
121121
) {

Diff for: src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use clippy_utils::{fn_def_id, get_parent_expr, is_diag_item_method, is_diag_trai
88
use clippy_utils::{meets_msrv, msrvs};
99
use rustc_errors::Applicability;
1010
use rustc_hir::{def_id::DefId, BorrowKind, Expr, ExprKind, ItemKind, LangItem, Node};
11-
use rustc_hir_analysis::check::{FnCtxt, Inherited};
11+
use rustc_hir_typeck::{FnCtxt, Inherited};
1212
use rustc_infer::infer::TyCtxtInferExt;
1313
use rustc_lint::LateContext;
1414
use rustc_middle::mir::Mutability;

Diff for: src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_hir::{
1212
BindingAnnotation, Body, FnDecl, GenericArg, HirId, Impl, ItemKind, Mutability, Node, PatKind, QPath, TyKind,
1313
};
1414
use rustc_hir::{HirIdMap, HirIdSet};
15-
use rustc_hir_analysis::expr_use_visitor as euv;
15+
use rustc_hir_typeck::expr_use_visitor as euv;
1616
use rustc_infer::infer::TyCtxtInferExt;
1717
use rustc_lint::{LateContext, LateLintPass};
1818
use rustc_middle::mir::FakeReadCause;
@@ -342,7 +342,7 @@ impl<'tcx> euv::Delegate<'tcx> for MovedVariablesCtxt {
342342

343343
fn fake_read(
344344
&mut self,
345-
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
345+
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
346346
_: FakeReadCause,
347347
_: HirId,
348348
) {

Diff for: src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::ops::ControlFlow;
88
use if_chain::if_chain;
99
use rustc_errors::Applicability;
1010
use rustc_hir as hir;
11-
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
11+
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
1212
use rustc_lint::LateContext;
1313
use rustc_middle::mir::FakeReadCause;
1414
use rustc_middle::ty::BorrowKind;

Diff for: src/tools/clippy/clippy_lints/src/transmute/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_hir::Expr;
2-
use rustc_hir_analysis::check::{cast, FnCtxt, Inherited};
2+
use rustc_hir_typeck::{cast, FnCtxt, Inherited};
33
use rustc_lint::LateContext;
44
use rustc_middle::ty::{cast::CastKind, Ty};
55
use rustc_span::DUMMY_SP;

Diff for: src/tools/clippy/clippy_utils/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern crate rustc_attr;
2424
extern crate rustc_data_structures;
2525
extern crate rustc_errors;
2626
extern crate rustc_hir;
27-
extern crate rustc_hir_analysis;
27+
extern crate rustc_hir_typeck;
2828
extern crate rustc_infer;
2929
extern crate rustc_lexer;
3030
extern crate rustc_lint;

Diff for: src/tools/clippy/clippy_utils/src/sugg.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_ast_pretty::pprust::token_kind_to_string;
1010
use rustc_errors::Applicability;
1111
use rustc_hir as hir;
1212
use rustc_hir::{Closure, ExprKind, HirId, MutTy, TyKind};
13-
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
13+
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
1414
use rustc_infer::infer::TyCtxtInferExt;
1515
use rustc_lint::{EarlyContext, LateContext, LintContext};
1616
use rustc_middle::hir::place::ProjectionKind;
@@ -1054,11 +1054,10 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
10541054

10551055
fn fake_read(
10561056
&mut self,
1057-
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
1057+
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
10581058
_: FakeReadCause,
10591059
_: HirId,
1060-
) {
1061-
}
1060+
) {}
10621061
}
10631062

10641063
#[cfg(test)]

Diff for: src/tools/clippy/clippy_utils/src/usage.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_hir as hir;
55
use rustc_hir::intravisit::{self, Visitor};
66
use rustc_hir::HirIdSet;
77
use rustc_hir::{Expr, ExprKind, HirId, Node};
8-
use rustc_hir_analysis::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
8+
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
99
use rustc_infer::infer::TyCtxtInferExt;
1010
use rustc_lint::LateContext;
1111
use rustc_middle::hir::nested_filter;
@@ -75,11 +75,10 @@ impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
7575

7676
fn fake_read(
7777
&mut self,
78-
_: &rustc_hir_analysis::expr_use_visitor::PlaceWithHirId<'tcx>,
78+
_: &rustc_hir_typeck::expr_use_visitor::PlaceWithHirId<'tcx>,
7979
_: FakeReadCause,
8080
_: HirId,
81-
) {
82-
}
81+
) {}
8382
}
8483

8584
pub struct ParamBindingIdCollector {

0 commit comments

Comments
 (0)