use crate::check::FnCtxt;
-use rustc::hir;
-use rustc::hir::def_id::{DefId, DefIndex};
-use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
+use rustc::hir::map::Map;
use rustc::infer::error_reporting::TypeAnnotationNeeded::E0282;
use rustc::infer::InferCtxt;
use rustc::ty::adjustment::{Adjust, Adjustment, PointerCast};
use rustc::ty::fold::{TypeFoldable, TypeFolder};
use rustc::ty::{self, Ty, TyCtxt};
-use rustc::util::nodemap::DefIdSet;
use rustc_data_structures::sync::Lrc;
+use rustc_hir as hir;
+use rustc_hir::def_id::{DefId, DefIdSet, DefIndex};
+use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
use rustc_span::symbol::sym;
use rustc_span::Span;
// operating on scalars, we clear the overload.
fn fix_scalar_builtin_expr(&mut self, e: &hir::Expr<'_>) {
match e.kind {
- hir::ExprKind::Unary(hir::UnNeg, ref inner)
- | hir::ExprKind::Unary(hir::UnNot, ref inner) => {
+ hir::ExprKind::Unary(hir::UnOp::UnNeg, ref inner)
+ | hir::ExprKind::Unary(hir::UnOp::UnNot, ref inner) => {
let inner_ty = self.fcx.node_ty(inner.hir_id);
let inner_ty = self.fcx.resolve_vars_if_possible(&inner_ty);
// traffic in node-ids or update tables in the type context etc.
impl<'cx, 'tcx> Visitor<'tcx> for WritebackCx<'cx, 'tcx> {
- fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'tcx> {
+ type Map = Map<'tcx>;
+
+ fn nested_visit_map(&mut self) -> NestedVisitorMap<'_, Self::Map> {
NestedVisitorMap::None
}