mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Remove type-traversal trait aliases
This commit is contained in:
parent
71b8646854
commit
430c4ab7ff
12 changed files with 14 additions and 14 deletions
|
@ -27,7 +27,7 @@ use rustc_middle::mir::{Rvalue, StatementKind};
|
|||
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow, AutoBorrowMutability};
|
||||
use rustc_middle::ty::{
|
||||
self, Binder, BoundVariableKind, Clause, EarlyBinder, FnSig, GenericArgKind, List, ParamTy, PredicateKind,
|
||||
ProjectionPredicate, Ty, TyCtxt, TypeVisitable, TypeckResults,
|
||||
ProjectionPredicate, Ty, TyCtxt, TypeVisitableExt, TypeckResults,
|
||||
};
|
||||
use rustc_session::{declare_tool_lint, impl_lint_pass};
|
||||
use rustc_span::{symbol::sym, Span, Symbol};
|
||||
|
|
|
@ -11,7 +11,7 @@ use rustc_hir::{Closure, Expr, ExprKind, Param, PatKind, Unsafety};
|
|||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AutoBorrow};
|
||||
use rustc_middle::ty::binding::BindingMode;
|
||||
use rustc_middle::ty::{self, EarlyBinder, SubstsRef, Ty, TypeVisitable};
|
||||
use rustc_middle::ty::{self, EarlyBinder, SubstsRef, Ty, TypeVisitableExt};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ use clippy_utils::{def_path_def_ids, trait_ref_of_method};
|
|||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::ty::TypeVisitable;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_middle::ty::{Adt, Array, Ref, Slice, Tuple, Ty};
|
||||
use rustc_session::{declare_tool_lint, impl_lint_pass};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
|
|
|
@ -18,7 +18,7 @@ use rustc_hir_typeck::expr_use_visitor as euv;
|
|||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::mir::FakeReadCause;
|
||||
use rustc_middle::ty::{self, TypeVisitable};
|
||||
use rustc_middle::ty::{self, TypeVisitableExt};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::symbol::kw;
|
||||
|
|
|
@ -6,7 +6,7 @@ use clippy_utils::sugg;
|
|||
use rustc_errors::Applicability;
|
||||
use rustc_hir::{self as hir, Expr, GenericArg, Mutability, Path, TyKind};
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::{self, Ty, TypeVisitable};
|
||||
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
|
||||
|
||||
/// Checks for `transmute_ptr_to_ref` lint.
|
||||
/// Returns `true` if it's triggered, otherwise returns `false`.
|
||||
|
|
|
@ -4,7 +4,7 @@ use clippy_utils::sugg;
|
|||
use rustc_errors::Applicability;
|
||||
use rustc_hir::Expr;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::{self, Ty, TypeVisitable};
|
||||
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
|
||||
|
||||
/// Checks for `useless_transmute` lint.
|
||||
/// Returns `true` if it's triggered, otherwise returns `false`.
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc_errors::Applicability;
|
|||
use rustc_hir::{self as hir, def_id::DefId, QPath, TyKind};
|
||||
use rustc_hir_analysis::hir_ty_to_ty;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::TypeVisitable;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
use super::{utils, REDUNDANT_ALLOCATION};
|
||||
|
|
|
@ -7,7 +7,7 @@ use rustc_hir::{self as hir, def_id::DefId, GenericArg, QPath, TyKind};
|
|||
use rustc_hir_analysis::hir_ty_to_ty;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::ty::layout::LayoutOf;
|
||||
use rustc_middle::ty::TypeVisitable;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
use super::VEC_BOX;
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc_hir::{self as hir, HirId, ItemKind, Node};
|
|||
use rustc_hir_analysis::hir_ty_to_ty;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::ty::layout::LayoutOf as _;
|
||||
use rustc_middle::ty::{Adt, Ty, TypeVisitable};
|
||||
use rustc_middle::ty::{Adt, Ty, TypeVisitableExt};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::sym;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ use rustc_middle::ty::fast_reject::SimplifiedType::{
|
|||
PtrSimplifiedType, SliceSimplifiedType, StrSimplifiedType, UintSimplifiedType,
|
||||
};
|
||||
use rustc_middle::ty::{
|
||||
layout::IntegerExt, BorrowKind, ClosureKind, DefIdTree, Ty, TyCtxt, TypeAndMut, TypeVisitable, UpvarCapture,
|
||||
layout::IntegerExt, BorrowKind, ClosureKind, DefIdTree, Ty, TyCtxt, TypeAndMut, TypeVisitableExt, UpvarCapture,
|
||||
};
|
||||
use rustc_middle::ty::{FloatTy, IntTy, UintTy};
|
||||
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
||||
|
|
|
@ -4,7 +4,7 @@ use rustc_data_structures::fx::FxHashMap;
|
|||
use rustc_index::bit_set::{BitSet, HybridBitSet};
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::mir::{self, visit::Visitor as _, Mutability};
|
||||
use rustc_middle::ty::{self, visit::ir::TypeVisitor, TyCtxt};
|
||||
use rustc_middle::ty::{self, visit::TypeVisitor, TyCtxt};
|
||||
use rustc_mir_dataflow::{impls::MaybeStorageLive, Analysis, ResultsCursor};
|
||||
use std::borrow::Cow;
|
||||
use std::ops::ControlFlow;
|
||||
|
|
|
@ -17,8 +17,8 @@ use rustc_lint::LateContext;
|
|||
use rustc_middle::mir::interpret::{ConstValue, Scalar};
|
||||
use rustc_middle::ty::{
|
||||
self, AdtDef, AliasTy, AssocKind, Binder, BoundRegion, DefIdTree, FnSig, IntTy, List, ParamEnv, Predicate,
|
||||
PredicateKind, Region, RegionKind, SubstsRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, ir::TypeVisitor, UintTy,
|
||||
VariantDef, VariantDiscr,
|
||||
PredicateKind, Region, RegionKind, SubstsRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor, UintTy,
|
||||
VariantDef, VariantDiscr, TypeVisitableExt,
|
||||
};
|
||||
use rustc_middle::ty::{GenericArg, GenericArgKind};
|
||||
use rustc_span::symbol::Ident;
|
||||
|
@ -847,7 +847,7 @@ pub fn for_each_top_level_late_bound_region<B>(
|
|||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
fn visit_binder<T: TypeVisitable<'tcx>>(&mut self, t: &Binder<'tcx, T>) -> ControlFlow<Self::BreakTy> {
|
||||
fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>(&mut self, t: &Binder<'tcx, T>) -> ControlFlow<Self::BreakTy> {
|
||||
self.index += 1;
|
||||
let res = t.super_visit_with(self);
|
||||
self.index -= 1;
|
||||
|
|
Loading…
Reference in a new issue