Move InferCtxtExt to rustc_trait_selection
This commit is contained in:
parent
1cff564203
commit
5ff45dc89e
@ -20,6 +20,7 @@
|
||||
#![feature(let_else)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(never_type)]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![recursion_limit = "512"] // For rustdoc
|
||||
|
||||
#[macro_use]
|
||||
|
@ -13,6 +13,7 @@ mod fulfill;
|
||||
pub mod misc;
|
||||
mod object_safety;
|
||||
mod on_unimplemented;
|
||||
pub mod outlives_bounds;
|
||||
mod project;
|
||||
pub mod query;
|
||||
pub(crate) mod relationships;
|
||||
|
@ -1,11 +1,11 @@
|
||||
use crate::infer::InferCtxt;
|
||||
use crate::traits::query::type_op::{self, TypeOp, TypeOpOutput};
|
||||
use crate::traits::query::NoSolution;
|
||||
use crate::traits::{ObligationCause, TraitEngine, TraitEngineExt};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::HirId;
|
||||
use rustc_middle::ty::{self, ParamEnv, Ty};
|
||||
use rustc_trait_selection::infer::InferCtxt;
|
||||
use rustc_trait_selection::traits::query::type_op::{self, TypeOp, TypeOpOutput};
|
||||
use rustc_trait_selection::traits::query::NoSolution;
|
||||
use rustc_trait_selection::traits::{ObligationCause, TraitEngine, TraitEngineExt};
|
||||
|
||||
pub use rustc_middle::traits::query::OutlivesBound;
|
||||
|
@ -1,6 +1,5 @@
|
||||
use super::potentially_plural_count;
|
||||
use crate::errors::LifetimesOrBoundsMismatchOnTrait;
|
||||
use crate::outlives::outlives_bounds::InferCtxtExt as _;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticId, ErrorGuaranteed};
|
||||
use rustc_hir as hir;
|
||||
@ -17,6 +16,7 @@ use rustc_middle::ty::{self, DefIdTree};
|
||||
use rustc_middle::ty::{GenericParamDefKind, ToPredicate, TyCtxt};
|
||||
use rustc_span::Span;
|
||||
use rustc_trait_selection::traits::error_reporting::InferCtxtExt;
|
||||
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
|
||||
use rustc_trait_selection::traits::{
|
||||
self, ObligationCause, ObligationCauseCode, ObligationCtxt, Reveal,
|
||||
};
|
||||
|
@ -1,5 +1,4 @@
|
||||
use crate::constrained_generic_params::{identify_constrained_generic_params, Parameter};
|
||||
use crate::outlives::outlives_bounds::InferCtxtExt as _;
|
||||
use rustc_ast as ast;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticBuilder, ErrorGuaranteed};
|
||||
@ -22,6 +21,7 @@ use rustc_span::symbol::{sym, Ident, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_trait_selection::autoderef::Autoderef;
|
||||
use rustc_trait_selection::traits::error_reporting::InferCtxtExt;
|
||||
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
|
||||
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
|
||||
use rustc_trait_selection::traits::{
|
||||
self, ObligationCause, ObligationCauseCode, ObligationCtxt, WellFormedLoc,
|
||||
|
@ -67,7 +67,6 @@
|
||||
|
||||
use crate::constrained_generic_params as cgp;
|
||||
use crate::errors::SubstsOnOverriddenImpl;
|
||||
use crate::outlives::outlives_bounds::InferCtxtExt as _;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
@ -79,6 +78,7 @@ use rustc_middle::ty::trait_def::TraitSpecializationKind;
|
||||
use rustc_middle::ty::{self, TyCtxt, TypeVisitable};
|
||||
use rustc_span::Span;
|
||||
use rustc_trait_selection::traits::error_reporting::InferCtxtExt;
|
||||
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
|
||||
use rustc_trait_selection::traits::{self, translate_substs, wf, ObligationCtxt};
|
||||
|
||||
pub(super) fn check_min_specialization(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) {
|
||||
|
@ -9,7 +9,6 @@ use rustc_span::Span;
|
||||
|
||||
mod explicit;
|
||||
mod implicit_infer;
|
||||
pub(crate) mod outlives_bounds;
|
||||
/// Code to write unit test for outlives.
|
||||
pub mod test;
|
||||
mod utils;
|
||||
|
Loading…
x
Reference in New Issue
Block a user