-use rustc::ty::{self, TyCtxt, TypeFoldable};
use rustc_data_structures::fx::FxHashMap;
use rustc_hir::def_id::DefId;
use rustc_infer::infer::InferCtxt;
+use rustc_middle::ty::{self, TyCtxt, TypeFoldable};
use rustc_span::Span;
+use rustc_trait_selection::opaque_types::InferCtxtExt;
use super::RegionInferenceContext;