Fallible<_> -> Result<_, NoSolution>
This commit is contained in:
parent
91525a4324
commit
0a35db5e0d
17 changed files with 55 additions and 53 deletions
|
@ -11,7 +11,7 @@ use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
|
|||
use rustc_span::def_id::CRATE_DEF_ID;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use rustc_trait_selection::infer::InferCtxtBuilderExt;
|
||||
use rustc_trait_selection::traits::query::{CanonicalTyGoal, Fallible, NoSolution};
|
||||
use rustc_trait_selection::traits::query::{CanonicalTyGoal, NoSolution};
|
||||
use rustc_trait_selection::traits::wf;
|
||||
use rustc_trait_selection::traits::ObligationCtxt;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
@ -37,7 +37,7 @@ fn compute_implied_outlives_bounds<'tcx>(
|
|||
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
ty: Ty<'tcx>,
|
||||
) -> Fallible<Vec<OutlivesBound<'tcx>>> {
|
||||
) -> Result<Vec<OutlivesBound<'tcx>>, NoSolution> {
|
||||
let tcx = ocx.infcx.tcx;
|
||||
|
||||
// Sometimes when we ask what it takes for T: WF, we get back that
|
||||
|
|
|
@ -2,6 +2,7 @@ use rustc_hir as hir;
|
|||
use rustc_infer::infer::canonical::{Canonical, QueryResponse};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::traits::query::NoSolution;
|
||||
use rustc_middle::traits::{DefiningAnchor, ObligationCauseCode};
|
||||
use rustc_middle::ty::{self, FnSig, Lift, PolyFnSig, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_middle::ty::{ParamEnvAnd, Predicate};
|
||||
|
@ -15,7 +16,6 @@ use rustc_trait_selection::traits::query::type_op::eq::Eq;
|
|||
use rustc_trait_selection::traits::query::type_op::normalize::Normalize;
|
||||
use rustc_trait_selection::traits::query::type_op::prove_predicate::ProvePredicate;
|
||||
use rustc_trait_selection::traits::query::type_op::subtype::Subtype;
|
||||
use rustc_trait_selection::traits::query::{Fallible, NoSolution};
|
||||
use rustc_trait_selection::traits::{Normalized, Obligation, ObligationCause, ObligationCtxt};
|
||||
use std::fmt;
|
||||
|
||||
|
@ -160,7 +160,7 @@ fn type_op_eq<'tcx>(
|
|||
fn type_op_normalize<'tcx, T>(
|
||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||
key: ParamEnvAnd<'tcx, Normalize<T>>,
|
||||
) -> Fallible<T>
|
||||
) -> Result<T, NoSolution>
|
||||
where
|
||||
T: fmt::Debug + TypeFoldable<TyCtxt<'tcx>> + Lift<'tcx>,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue