1
1
use crate :: infer:: canonical:: { Canonical , CanonicalQueryResponse } ;
2
- use crate :: traits:: query:: Fallible ;
2
+ use rustc_middle :: traits:: query:: NoSolution ;
3
3
use rustc_middle:: ty:: fold:: TypeFoldable ;
4
4
use rustc_middle:: ty:: { self , Lift , ParamEnvAnd , Ty , TyCtxt , TypeVisitableExt } ;
5
5
use std:: fmt;
19
19
fn perform_query (
20
20
tcx : TyCtxt < ' tcx > ,
21
21
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Self > > ,
22
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self :: QueryResponse > > {
22
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self :: QueryResponse > , NoSolution > {
23
23
T :: type_op_method ( tcx, canonicalized)
24
24
}
25
25
}
@@ -28,14 +28,14 @@ pub trait Normalizable<'tcx>: fmt::Debug + TypeFoldable<TyCtxt<'tcx>> + Lift<'tc
28
28
fn type_op_method (
29
29
tcx : TyCtxt < ' tcx > ,
30
30
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
31
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self > > ;
31
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self > , NoSolution > ;
32
32
}
33
33
34
34
impl < ' tcx > Normalizable < ' tcx > for Ty < ' tcx > {
35
35
fn type_op_method (
36
36
tcx : TyCtxt < ' tcx > ,
37
37
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
38
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self > > {
38
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self > , NoSolution > {
39
39
tcx. type_op_normalize_ty ( canonicalized)
40
40
}
41
41
}
@@ -44,7 +44,7 @@ impl<'tcx> Normalizable<'tcx> for ty::Predicate<'tcx> {
44
44
fn type_op_method (
45
45
tcx : TyCtxt < ' tcx > ,
46
46
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
47
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self > > {
47
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self > , NoSolution > {
48
48
tcx. type_op_normalize_predicate ( canonicalized)
49
49
}
50
50
}
@@ -53,7 +53,7 @@ impl<'tcx> Normalizable<'tcx> for ty::PolyFnSig<'tcx> {
53
53
fn type_op_method (
54
54
tcx : TyCtxt < ' tcx > ,
55
55
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
56
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self > > {
56
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self > , NoSolution > {
57
57
tcx. type_op_normalize_poly_fn_sig ( canonicalized)
58
58
}
59
59
}
@@ -62,7 +62,7 @@ impl<'tcx> Normalizable<'tcx> for ty::FnSig<'tcx> {
62
62
fn type_op_method (
63
63
tcx : TyCtxt < ' tcx > ,
64
64
canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
65
- ) -> Fallible < CanonicalQueryResponse < ' tcx , Self > > {
65
+ ) -> Result < CanonicalQueryResponse < ' tcx , Self > , NoSolution > {
66
66
tcx. type_op_normalize_fn_sig ( canonicalized)
67
67
}
68
68
}
0 commit comments