Remove librustc_infer crate re-exports.
This commit is contained in:
parent
bee6a5ac12
commit
795673ae20
@ -27,8 +27,8 @@
|
||||
|
||||
use super::*;
|
||||
|
||||
use crate::ty::relate::{Relate, TypeRelation};
|
||||
use crate::ty::Const;
|
||||
use rustc::ty::relate::{Relate, TypeRelation};
|
||||
use rustc::ty::Const;
|
||||
|
||||
pub struct At<'a, 'tcx> {
|
||||
pub infcx: &'a InferCtxt<'a, 'tcx>,
|
||||
|
@ -10,10 +10,10 @@ use crate::infer::canonical::{
|
||||
OriginalQueryValues,
|
||||
};
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::ty::flags::FlagComputation;
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use crate::ty::subst::GenericArg;
|
||||
use crate::ty::{self, BoundVar, InferConst, List, Ty, TyCtxt, TypeFlags};
|
||||
use rustc::ty::flags::FlagComputation;
|
||||
use rustc::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use rustc::ty::subst::GenericArg;
|
||||
use rustc::ty::{self, BoundVar, InferConst, List, Ty, TyCtxt, TypeFlags};
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
@ -7,7 +7,6 @@
|
||||
//!
|
||||
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
|
||||
|
||||
use crate::arena::ArenaAllocatable;
|
||||
use crate::infer::canonical::substitute::{substitute_value, CanonicalExt};
|
||||
use crate::infer::canonical::{
|
||||
Canonical, CanonicalVarValues, CanonicalizedQueryResponse, Certainty, OriginalQueryValues,
|
||||
@ -19,6 +18,7 @@ use crate::infer::{InferCtxt, InferOk, InferResult};
|
||||
use crate::traits::query::{Fallible, NoSolution};
|
||||
use crate::traits::TraitEngine;
|
||||
use crate::traits::{Obligation, ObligationCause, PredicateObligation};
|
||||
use rustc::arena::ArenaAllocatable;
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::subst::{GenericArg, GenericArgKind};
|
||||
use rustc::ty::{self, BoundVar, Ty, TyCtxt};
|
||||
|
@ -7,9 +7,9 @@
|
||||
//! [c]: https://rust-lang.github.io/rustc-guide/traits/canonicalization.html
|
||||
|
||||
use crate::infer::canonical::{Canonical, CanonicalVarValues};
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::subst::GenericArgKind;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::subst::GenericArgKind;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
|
||||
pub(super) trait CanonicalExt<'tcx, V> {
|
||||
/// Instantiate the wrapped value, replacing each canonical value
|
||||
|
@ -33,12 +33,12 @@ use super::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
|
||||
use super::{InferCtxt, MiscVariable, TypeTrace};
|
||||
|
||||
use crate::traits::{Obligation, PredicateObligations};
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use crate::ty::{IntType, UintType};
|
||||
|
||||
use rustc::ty::error::TypeError;
|
||||
use rustc::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc::ty::{IntType, UintType};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use syntax::ast;
|
||||
|
@ -1,10 +1,10 @@
|
||||
use super::combine::{CombineFields, RelationDir};
|
||||
use super::Subtype;
|
||||
|
||||
use crate::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::TyVar;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc::ty::TyVar;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::hir::map::Map;
|
||||
use crate::infer::type_variable::TypeVariableOriginKind;
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::ty::print::Print;
|
||||
use crate::ty::{self, DefIdTree, Infer, Ty, TyVar};
|
||||
use rustc::hir::map::Map;
|
||||
use rustc::ty::print::Print;
|
||||
use rustc::ty::{self, DefIdTree, Infer, Ty, TyVar};
|
||||
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Namespace};
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
use crate::infer::error_reporting::nice_region_error::util::AnonymousParamInfo;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::util::common::ErrorReported;
|
||||
|
||||
use rustc_errors::struct_span_err;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::hir::map::Map;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::middle::resolve_lifetime as rl;
|
||||
use crate::ty::{self, Region, TyCtxt};
|
||||
use rustc::hir::map::Map;
|
||||
use rustc::middle::resolve_lifetime as rl;
|
||||
use rustc::ty::{self, Region, TyCtxt};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_hir::Node;
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError::*;
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Error Reporting for Anonymous Region Lifetime Errors
|
||||
//! where one region is named and the other is anonymous.
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::ty;
|
||||
use rustc::ty;
|
||||
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir::{FunctionRetTy, TyKind};
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError::SubSupConflict;
|
||||
use crate::infer::SubregionOrigin;
|
||||
use crate::ty::RegionKind;
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::ty::RegionKind;
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_hir::{Expr, ExprKind::Closure, Node};
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
|
@ -3,10 +3,10 @@ use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::infer::ValuePairs;
|
||||
use crate::infer::{SubregionOrigin, TypeTrace};
|
||||
use crate::traits::{ObligationCause, ObligationCauseCode};
|
||||
use crate::ty::error::ExpectedFound;
|
||||
use crate::ty::print::{FmtPrinter, Print, RegionHighlightMode};
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc::ty::error::ExpectedFound;
|
||||
use rustc::ty::print::{FmtPrinter, Print, RegionHighlightMode};
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -3,8 +3,8 @@
|
||||
use crate::infer::error_reporting::msg_span_from_free_region;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::ty::{BoundRegion, FreeRegion, RegionKind};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::ty::{BoundRegion, FreeRegion, RegionKind};
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_errors::Applicability;
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
|
@ -4,8 +4,8 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::infer::{Subtype, ValuePairs};
|
||||
use crate::traits::ObligationCauseCode::CompareImplMethodObligation;
|
||||
use crate::ty::Ty;
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::ty::Ty;
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_span::Span;
|
||||
|
||||
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! anonymous regions.
|
||||
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::ty::{self, DefIdTree, Region, Ty};
|
||||
use rustc::ty::{self, DefIdTree, Region, Ty};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
|
@ -31,8 +31,8 @@
|
||||
//! variable only once, and it does so as soon as it can, so it is reasonable to ask what the type
|
||||
//! inferencer knows "so far".
|
||||
|
||||
use crate::ty::fold::TypeFolder;
|
||||
use crate::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc::ty::fold::TypeFolder;
|
||||
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use crate::ty::{self, ConstVid, FloatVid, IntVid, RegionVid, Ty, TyCtxt, TyVid};
|
||||
use rustc::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use rustc::ty::{self, ConstVid, FloatVid, IntVid, RegionVid, Ty, TyCtxt, TyVid};
|
||||
|
||||
use super::type_variable::TypeVariableOrigin;
|
||||
use super::InferCtxt;
|
||||
|
@ -4,8 +4,8 @@ use super::InferCtxt;
|
||||
use super::Subtype;
|
||||
|
||||
use crate::traits::ObligationCause;
|
||||
use crate::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
|
||||
/// "Greatest lower bound" (common subtype)
|
||||
pub struct Glb<'combine, 'infcx, 'tcx> {
|
||||
|
@ -5,8 +5,8 @@ use super::combine::CombineFields;
|
||||
use super::{HigherRankedType, InferCtxt, PlaceholderMap};
|
||||
|
||||
use crate::infer::CombinedSnapshot;
|
||||
use crate::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::{self, Binder, TypeFoldable};
|
||||
use rustc::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::{self, Binder, TypeFoldable};
|
||||
|
||||
impl<'a, 'tcx> CombineFields<'a, 'tcx> {
|
||||
pub fn higher_ranked_sub<T>(
|
||||
|
@ -23,9 +23,9 @@ use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use super::InferCtxt;
|
||||
|
||||
use crate::traits::ObligationCause;
|
||||
use crate::ty::relate::{RelateResult, TypeRelation};
|
||||
use crate::ty::TyVar;
|
||||
use crate::ty::{self, Ty};
|
||||
use rustc::ty::relate::{RelateResult, TypeRelation};
|
||||
use rustc::ty::TyVar;
|
||||
use rustc::ty::{self, Ty};
|
||||
|
||||
pub trait LatticeDir<'f, 'tcx>: TypeRelation<'tcx> {
|
||||
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;
|
||||
|
@ -11,9 +11,9 @@ use graphviz as dot;
|
||||
use super::Constraint;
|
||||
use crate::infer::region_constraints::RegionConstraintData;
|
||||
use crate::infer::SubregionOrigin;
|
||||
use crate::middle::free_region::RegionRelations;
|
||||
use crate::middle::region;
|
||||
use crate::ty;
|
||||
use rustc::middle::free_region::RegionRelations;
|
||||
use rustc::middle::region;
|
||||
use rustc::ty;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_hir::def_id::DefIndex;
|
||||
|
||||
|
@ -8,12 +8,12 @@ use crate::infer::region_constraints::VarInfos;
|
||||
use crate::infer::region_constraints::VerifyBound;
|
||||
use crate::infer::RegionVariableOrigin;
|
||||
use crate::infer::SubregionOrigin;
|
||||
use crate::middle::free_region::RegionRelations;
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use crate::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
|
||||
use crate::ty::{ReLateBound, RePlaceholder, ReScope, ReVar};
|
||||
use crate::ty::{Region, RegionVid};
|
||||
use rustc::middle::free_region::RegionRelations;
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
|
||||
use rustc::ty::{ReLateBound, RePlaceholder, ReScope, ReVar};
|
||||
use rustc::ty::{Region, RegionVid};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::implementation::{
|
||||
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
|
||||
|
@ -4,8 +4,8 @@ use super::InferCtxt;
|
||||
use super::Subtype;
|
||||
|
||||
use crate::traits::ObligationCause;
|
||||
use crate::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::relate::{Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
|
||||
/// "Least upper bound" (common supertype)
|
||||
pub struct Lub<'combine, 'infcx, 'tcx> {
|
||||
|
@ -5,7 +5,7 @@ pub use self::LateBoundRegionConversionTime::*;
|
||||
pub use self::RegionVariableOrigin::*;
|
||||
pub use self::SubregionOrigin::*;
|
||||
pub use self::ValuePairs::*;
|
||||
pub use crate::ty::IntVarValue;
|
||||
pub use rustc::ty::IntVarValue;
|
||||
|
||||
use crate::traits::{self, ObligationCause, PredicateObligations, TraitEngine};
|
||||
|
||||
@ -650,8 +650,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
}
|
||||
|
||||
pub fn type_is_unconstrained_numeric(&'a self, ty: Ty<'_>) -> UnconstrainedNumeric {
|
||||
use crate::ty::error::UnconstrainedNumeric::Neither;
|
||||
use crate::ty::error::UnconstrainedNumeric::{UnconstrainedFloat, UnconstrainedInt};
|
||||
use rustc::ty::error::UnconstrainedNumeric::Neither;
|
||||
use rustc::ty::error::UnconstrainedNumeric::{UnconstrainedFloat, UnconstrainedInt};
|
||||
match ty.kind {
|
||||
ty::Infer(ty::IntVar(vid)) => {
|
||||
if self.inner.borrow_mut().int_unification_table.probe_value(vid).is_some() {
|
||||
|
@ -24,11 +24,11 @@
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::infer::{ConstVarValue, ConstVariableValue};
|
||||
use crate::traits::DomainGoal;
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::ty::fold::{TypeFoldable, TypeVisitor};
|
||||
use crate::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::subst::GenericArg;
|
||||
use crate::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc::ty::error::TypeError;
|
||||
use rustc::ty::fold::{TypeFoldable, TypeVisitor};
|
||||
use rustc::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::subst::GenericArg;
|
||||
use rustc::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use std::fmt::Debug;
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
use crate::infer::error_reporting::{note_and_explain_free_region, note_and_explain_region};
|
||||
use crate::infer::{self, InferCtxt, InferOk, TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use crate::middle::region;
|
||||
use crate::traits::{self, PredicateObligation};
|
||||
use crate::ty::fold::{BottomUpFolder, TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use crate::ty::free_region_map::FreeRegionRelations;
|
||||
use crate::ty::subst::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef};
|
||||
use crate::ty::{self, GenericParamDefKind, Ty, TyCtxt};
|
||||
use rustc::middle::region;
|
||||
use rustc::session::config::nightly_options;
|
||||
use rustc::ty::fold::{BottomUpFolder, TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use rustc::ty::free_region_map::FreeRegionRelations;
|
||||
use rustc::ty::subst::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef};
|
||||
use rustc::ty::{self, GenericParamDefKind, Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder};
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::infer::{GenericKind, InferCtxt};
|
||||
use crate::traits::query::outlives_bounds::{self, OutlivesBound};
|
||||
use crate::ty::free_region_map::FreeRegionMap;
|
||||
use crate::ty::{self, Ty};
|
||||
use rustc::ty::free_region_map::FreeRegionMap;
|
||||
use rustc::ty::{self, Ty};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir as hir;
|
||||
use rustc_span::Span;
|
||||
|
@ -63,9 +63,9 @@ use crate::infer::outlives::env::RegionBoundPairs;
|
||||
use crate::infer::outlives::verify::VerifyBoundCx;
|
||||
use crate::infer::{self, GenericKind, InferCtxt, RegionObligation, SubregionOrigin, VerifyBound};
|
||||
use crate::traits::ObligationCause;
|
||||
use crate::ty::outlives::Component;
|
||||
use crate::ty::subst::GenericArgKind;
|
||||
use crate::ty::{self, Region, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc::ty::outlives::Component;
|
||||
use rustc::ty::subst::GenericArgKind;
|
||||
use rustc::ty::{self, Region, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir as hir;
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::infer::outlives::env::RegionBoundPairs;
|
||||
use crate::infer::{GenericKind, VerifyBound};
|
||||
use crate::traits;
|
||||
use crate::ty::subst::{InternalSubsts, Subst};
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
use crate::infer::{CombinedSnapshot, PlaceholderMap};
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::ty::relate::RelateResult;
|
||||
use rustc::ty::error::TypeError;
|
||||
use rustc::ty::relate::RelateResult;
|
||||
|
||||
impl<'tcx> RegionConstraintCollector<'tcx> {
|
||||
/// Searches region constraints created since `snapshot` that
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use super::{FixupError, FixupResult, InferCtxt, Span};
|
||||
use crate::ty::fold::{TypeFolder, TypeVisitor};
|
||||
use crate::ty::{self, Const, InferConst, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc::ty::fold::{TypeFolder, TypeVisitor};
|
||||
use rustc::ty::{self, Const, InferConst, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// OPPORTUNISTIC VAR RESOLVER
|
||||
|
@ -2,10 +2,10 @@ use super::combine::{CombineFields, RelationDir};
|
||||
use super::SubregionOrigin;
|
||||
|
||||
use crate::traits::Obligation;
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::relate::{Cause, Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::TyVar;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::relate::{Cause, Relate, RelateResult, TypeRelation};
|
||||
use rustc::ty::TyVar;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use std::mem;
|
||||
|
||||
/// Ensures `a` is made a subtype of `b`. Returns `a` on success.
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::ty::{self, Ty, TyVid};
|
||||
use rustc::ty::{self, Ty, TyVid};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
|
@ -56,12 +56,5 @@ extern crate log;
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
|
||||
use rustc::arena;
|
||||
use rustc::dep_graph;
|
||||
use rustc::hir;
|
||||
pub mod infer;
|
||||
use rustc::middle;
|
||||
pub use rustc_session as session;
|
||||
pub mod traits;
|
||||
use rustc::ty;
|
||||
use rustc::util;
|
||||
|
@ -5,8 +5,8 @@ use super::*;
|
||||
|
||||
use crate::infer::region_constraints::{Constraint, RegionConstraintData};
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::ty::fold::TypeFolder;
|
||||
use crate::ty::{Region, RegionVid};
|
||||
use rustc::ty::fold::TypeFolder;
|
||||
use rustc::ty::{Region, RegionVid};
|
||||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
|
||||
|
@ -5,7 +5,7 @@ use crate::traits::{
|
||||
Environment, FulfillmentError, FulfillmentErrorCode, InEnvironment, ObligationCause,
|
||||
PredicateObligation, SelectionError, TraitEngine,
|
||||
};
|
||||
use crate::ty::{self, Ty};
|
||||
use rustc::ty::{self, Ty};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
|
||||
pub use rustc::traits::ChalkCanonicalGoal as CanonicalGoal;
|
||||
|
@ -7,8 +7,8 @@ use crate::infer::{InferCtxt, TyCtxtInferExt};
|
||||
use crate::traits::{
|
||||
FulfillmentContext, Obligation, ObligationCause, SelectionContext, TraitEngine, Vtable,
|
||||
};
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
|
||||
/// Attempts to resolve an obligation to a vtable. The result is
|
||||
/// a shallow vtable resolution, meaning that we do not
|
||||
|
@ -8,9 +8,9 @@ use crate::infer::{CombinedSnapshot, InferOk, TyCtxtInferExt};
|
||||
use crate::traits::select::IntercrateAmbiguityCause;
|
||||
use crate::traits::SkipLeakCheck;
|
||||
use crate::traits::{self, Normalized, Obligation, ObligationCause, SelectionContext};
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::subst::Subst;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::subst::Subst;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::traits::Obligation;
|
||||
use crate::ty::{self, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc::ty::{self, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
use super::{ChalkFulfillmentContext, FulfillmentContext, FulfillmentError};
|
||||
|
@ -2,8 +2,8 @@ use super::{
|
||||
ObligationCauseCode, OnUnimplementedDirective, OnUnimplementedNote, PredicateObligation,
|
||||
};
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::ty::subst::Subst;
|
||||
use crate::ty::{self, GenericParamDefKind};
|
||||
use rustc::ty::subst::Subst;
|
||||
use rustc::ty::{self, GenericParamDefKind};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::symbol::sym;
|
||||
|
@ -6,8 +6,9 @@ use super::{
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::traits::error_reporting::suggest_constraining_type_param;
|
||||
use crate::traits::object_safety::object_safety_violations;
|
||||
use crate::ty::TypeckTables;
|
||||
use crate::ty::{self, AdtKind, DefIdTree, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
|
||||
use rustc::ty::TypeckTables;
|
||||
use rustc::ty::{self, AdtKind, DefIdTree, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc_errors::{
|
||||
error_code, pluralize, struct_span_err, Applicability, DiagnosticBuilder, Style,
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::infer::{InferCtxt, ShallowResolver};
|
||||
use crate::ty::error::ExpectedFound;
|
||||
use crate::ty::{self, ToPolyTraitRef, Ty, TypeFoldable};
|
||||
use rustc::ty::error::ExpectedFound;
|
||||
use rustc::ty::{self, ToPolyTraitRef, Ty, TypeFoldable};
|
||||
use rustc_data_structures::obligation_forest::ProcessResult;
|
||||
use rustc_data_structures::obligation_forest::{DoCompleted, Error, ForestObligation};
|
||||
use rustc_data_structures::obligation_forest::{ObligationForest, ObligationProcessor};
|
||||
|
@ -24,12 +24,12 @@ pub mod wf;
|
||||
|
||||
use crate::infer::outlives::env::OutlivesEnvironment;
|
||||
use crate::infer::{InferCtxt, SuppressRegionErrors, TyCtxtInferExt};
|
||||
use crate::middle::region;
|
||||
use crate::ty::error::{ExpectedFound, TypeError};
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::subst::{InternalSubsts, SubstsRef};
|
||||
use crate::ty::{self, GenericParamDefKind, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::middle::region;
|
||||
use rustc::ty::error::{ExpectedFound, TypeError};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::subst::{InternalSubsts, SubstsRef};
|
||||
use rustc::ty::{self, GenericParamDefKind, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
@ -12,8 +12,8 @@ use super::elaborate_predicates;
|
||||
|
||||
use crate::infer::TyCtxtInferExt;
|
||||
use crate::traits::{self, Obligation, ObligationCause};
|
||||
use crate::ty::subst::{InternalSubsts, Subst};
|
||||
use crate::ty::{self, Predicate, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc::ty::{self, Predicate, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
@ -553,7 +553,7 @@ fn virtual_call_violation_for_method<'tcx>(
|
||||
} else {
|
||||
// Do sanity check to make sure the receiver actually has the layout of a pointer.
|
||||
|
||||
use crate::ty::layout::Abi;
|
||||
use rustc::ty::layout::Abi;
|
||||
|
||||
let param_env = tcx.param_env(method.def_id);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use fmt_macros::{Parser, Piece, Position};
|
||||
|
||||
use crate::ty::{self, GenericParamDefKind, TyCtxt};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::ty::{self, GenericParamDefKind, TyCtxt};
|
||||
use rustc::util::common::ErrorReported;
|
||||
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
@ -14,9 +14,9 @@ use super::{VtableClosureData, VtableFnPointerData, VtableGeneratorData, VtableI
|
||||
|
||||
use crate::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
||||
use crate::infer::{InferCtxt, InferOk, LateBoundRegionConversionTime};
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use crate::ty::subst::{InternalSubsts, Subst};
|
||||
use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use rustc::ty::subst::{InternalSubsts, Subst};
|
||||
use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc_data_structures::snapshot_map::{Snapshot, SnapshotMap};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::symbol::sym;
|
||||
|
@ -7,9 +7,9 @@ use crate::infer::canonical::OriginalQueryValues;
|
||||
use crate::infer::{InferCtxt, InferOk};
|
||||
use crate::traits::project::Normalized;
|
||||
use crate::traits::{Obligation, ObligationCause, PredicateObligation, Reveal};
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use crate::ty::subst::Subst;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::fold::{TypeFoldable, TypeFolder};
|
||||
use rustc::ty::subst::Subst;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
|
||||
use super::NoSolution;
|
||||
|
||||
|
@ -2,7 +2,7 @@ use crate::infer::canonical::OriginalQueryValues;
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::traits::query::NoSolution;
|
||||
use crate::traits::{FulfillmentContext, ObligationCause, TraitEngine, TraitEngineExt};
|
||||
use crate::ty::{self, Ty};
|
||||
use rustc::ty::{self, Ty};
|
||||
use rustc_hir as hir;
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::{ParamEnvAnd, TyCtxt};
|
||||
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
||||
|
||||
pub use rustc::traits::query::type_op::Eq;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::outlives_bounds::OutlivesBound;
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::{ParamEnvAnd, Ty, TyCtxt};
|
||||
use rustc::ty::{ParamEnvAnd, Ty, TyCtxt};
|
||||
|
||||
#[derive(Clone, Debug, HashStable, TypeFoldable, Lift)]
|
||||
pub struct ImpliedOutlivesBounds<'tcx> {
|
||||
|
@ -4,8 +4,8 @@ use crate::infer::canonical::{
|
||||
use crate::infer::{InferCtxt, InferOk};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::traits::ObligationCause;
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::{ParamEnvAnd, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::fold::TypeFoldable;
|
||||
use crate::ty::{self, Lift, ParamEnvAnd, Ty, TyCtxt};
|
||||
use rustc::ty::fold::TypeFoldable;
|
||||
use rustc::ty::{self, Lift, ParamEnvAnd, Ty, TyCtxt};
|
||||
use std::fmt;
|
||||
|
||||
pub use rustc::traits::query::type_op::Normalize;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::dropck_outlives::{trivial_dropck_outlives, DropckOutlivesResult};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::{ParamEnvAnd, Ty, TyCtxt};
|
||||
use rustc::ty::{ParamEnvAnd, Ty, TyCtxt};
|
||||
|
||||
#[derive(Copy, Clone, Debug, HashStable, TypeFoldable, Lift)]
|
||||
pub struct DropckOutlives<'tcx> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::{ParamEnvAnd, Predicate, TyCtxt};
|
||||
use rustc::ty::{ParamEnvAnd, Predicate, TyCtxt};
|
||||
|
||||
pub use rustc::traits::query::type_op::ProvePredicate;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
|
||||
use crate::traits::query::Fallible;
|
||||
use crate::ty::{ParamEnvAnd, TyCtxt};
|
||||
use rustc::ty::{ParamEnvAnd, TyCtxt};
|
||||
|
||||
pub use rustc::traits::query::type_op::Subtype;
|
||||
|
||||
|
@ -33,13 +33,13 @@ use super::{
|
||||
VtableGeneratorData, VtableImplData, VtableObjectData, VtableTraitAliasData,
|
||||
};
|
||||
|
||||
use crate::dep_graph::{DepKind, DepNodeIndex};
|
||||
use crate::infer::{CombinedSnapshot, InferCtxt, InferOk, PlaceholderMap, TypeFreshener};
|
||||
use crate::middle::lang_items;
|
||||
use crate::ty::fast_reject;
|
||||
use crate::ty::relate::TypeRelation;
|
||||
use crate::ty::subst::{Subst, SubstsRef};
|
||||
use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc::dep_graph::{DepKind, DepNodeIndex};
|
||||
use rustc::middle::lang_items;
|
||||
use rustc::ty::fast_reject;
|
||||
use rustc::ty::relate::TypeRelation;
|
||||
use rustc::ty::subst::{Subst, SubstsRef};
|
||||
use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -15,9 +15,9 @@ use specialization_graph::GraphExt;
|
||||
use crate::infer::{InferCtxt, InferOk, TyCtxtInferExt};
|
||||
use crate::traits::select::IntercrateAmbiguityCause;
|
||||
use crate::traits::{self, coherence, FutureCompatOverlapErrorKind, ObligationCause, TraitEngine};
|
||||
use crate::ty::subst::{InternalSubsts, Subst, SubstsRef};
|
||||
use crate::ty::{self, TyCtxt, TypeFoldable};
|
||||
use rustc::lint::LintDiagnosticBuilder;
|
||||
use rustc::ty::subst::{InternalSubsts, Subst, SubstsRef};
|
||||
use rustc::ty::{self, TyCtxt, TypeFoldable};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::traits;
|
||||
use crate::traits::project::Normalized;
|
||||
use crate::ty;
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use rustc::ty;
|
||||
use rustc::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
@ -3,9 +3,9 @@ use rustc_span::Span;
|
||||
use smallvec::smallvec;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use crate::ty::outlives::Component;
|
||||
use crate::ty::subst::{GenericArg, Subst, SubstsRef};
|
||||
use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc::ty::outlives::Component;
|
||||
use rustc::ty::subst::{GenericArg, Subst, SubstsRef};
|
||||
use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, WithConstness};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -1,9 +1,9 @@
|
||||
use crate::infer::opaque_types::required_region_bounds;
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::middle::lang_items;
|
||||
use crate::traits::{self, AssocTypeBoundData};
|
||||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc::middle::lang_items;
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::symbol::{kw, Ident};
|
||||
|
Loading…
x
Reference in New Issue
Block a user