diff options
| author | Michael Goulet <michael@errs.io> | 2023-05-25 17:29:22 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-05-25 17:29:22 +0000 |
| commit | 0a35db5e0d0f855ec9706280cef21fdc8a1f6ce5 (patch) | |
| tree | 11695cb4c0f1e43bfdaf544899ac64a57fc227c6 /compiler/rustc_trait_selection/src/infer.rs | |
| parent | 91525a43243e088abb34fca3d43fd8588b8667e0 (diff) | |
| download | rust-0a35db5e0d0f855ec9706280cef21fdc8a1f6ce5.tar.gz rust-0a35db5e0d0f855ec9706280cef21fdc8a1f6ce5.zip | |
Fallible<_> -> Result<_, NoSolution>
Diffstat (limited to 'compiler/rustc_trait_selection/src/infer.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/infer.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index 142c20014a0..312bd38178f 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -5,7 +5,7 @@ use rustc_hir::def_id::DefId; use rustc_hir::lang_items::LangItem; use rustc_middle::arena::ArenaAllocatable; use rustc_middle::infer::canonical::{Canonical, CanonicalQueryResponse, QueryResponse}; -use rustc_middle::traits::query::Fallible; +use rustc_middle::traits::query::NoSolution; use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitableExt}; use rustc_middle::ty::{GenericArg, ToPredicate}; use rustc_span::DUMMY_SP; @@ -82,8 +82,8 @@ pub trait InferCtxtBuilderExt<'tcx> { fn enter_canonical_trait_query<K, R>( &mut self, canonical_key: &Canonical<'tcx, K>, - operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Fallible<R>, - ) -> Fallible<CanonicalQueryResponse<'tcx, R>> + operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Result<R, NoSolution>, + ) -> Result<CanonicalQueryResponse<'tcx, R>, NoSolution> where K: TypeFoldable<TyCtxt<'tcx>>, R: Debug + TypeFoldable<TyCtxt<'tcx>>, @@ -110,8 +110,8 @@ impl<'tcx> InferCtxtBuilderExt<'tcx> for InferCtxtBuilder<'tcx> { fn enter_canonical_trait_query<K, R>( &mut self, canonical_key: &Canonical<'tcx, K>, - operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Fallible<R>, - ) -> Fallible<CanonicalQueryResponse<'tcx, R>> + operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Result<R, NoSolution>, + ) -> Result<CanonicalQueryResponse<'tcx, R>, NoSolution> where K: TypeFoldable<TyCtxt<'tcx>>, R: Debug + TypeFoldable<TyCtxt<'tcx>>, |
