From 0a35db5e0d0f855ec9706280cef21fdc8a1f6ce5 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 25 May 2023 17:29:22 +0000 Subject: Fallible<_> -> Result<_, NoSolution> --- compiler/rustc_traits/src/implied_outlives_bounds.rs | 4 ++-- compiler/rustc_traits/src/type_op.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_traits') diff --git a/compiler/rustc_traits/src/implied_outlives_bounds.rs b/compiler/rustc_traits/src/implied_outlives_bounds.rs index 0c2bb863e1f..49cbf9efa74 100644 --- a/compiler/rustc_traits/src/implied_outlives_bounds.rs +++ b/compiler/rustc_traits/src/implied_outlives_bounds.rs @@ -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>> { +) -> Result>, NoSolution> { let tcx = ocx.infcx.tcx; // Sometimes when we ask what it takes for T: WF, we get back that diff --git a/compiler/rustc_traits/src/type_op.rs b/compiler/rustc_traits/src/type_op.rs index b1cbd88ce27..faf985169de 100644 --- a/compiler/rustc_traits/src/type_op.rs +++ b/compiler/rustc_traits/src/type_op.rs @@ -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>, -) -> Fallible +) -> Result where T: fmt::Debug + TypeFoldable> + Lift<'tcx>, { -- cgit 1.4.1-3-g733a5