@@ -3,8 +3,7 @@ use crate::rust_ir::{ClosureKind, FnDefInputsAndOutputDatum, WellKnownTrait};
3
3
use crate :: { Interner , RustIrDatabase , TraitRef } ;
4
4
use chalk_ir:: cast:: Cast ;
5
5
use chalk_ir:: {
6
- AliasTy , Binders , Floundered , Normalize , ProjectionTy , Safety , Substitution , TraitId , Ty ,
7
- TyKind ,
6
+ AliasTy , Binders , Normalize , ProjectionTy , Safety , Substitution , TraitId , Ty , TyKind ,
8
7
} ;
9
8
10
9
fn push_clauses < I : Interner > (
@@ -86,7 +85,7 @@ pub fn add_fn_trait_program_clauses<I: Interner>(
86
85
builder : & mut ClauseBuilder < ' _ , I > ,
87
86
well_known : WellKnownTrait ,
88
87
self_ty : Ty < I > ,
89
- ) -> Result < ( ) , Floundered > {
88
+ ) {
90
89
let interner = db. interner ( ) ;
91
90
let trait_id = db. well_known_trait_id ( well_known) . unwrap ( ) ;
92
91
@@ -107,7 +106,6 @@ pub fn add_fn_trait_program_clauses<I: Interner>(
107
106
bound. inputs_and_output ,
108
107
) ;
109
108
}
110
- Ok ( ( ) )
111
109
}
112
110
TyKind :: Closure ( closure_id, substitution) => {
113
111
let closure_kind = db. closure_kind ( * closure_id, substitution) ;
@@ -118,7 +116,7 @@ pub fn add_fn_trait_program_clauses<I: Interner>(
118
116
| ( WellKnownTrait :: FnOnce , _)
119
117
) ;
120
118
if !trait_matches {
121
- return Ok ( ( ) ) ;
119
+ return ;
122
120
}
123
121
let closure_inputs_and_output = db. closure_inputs_and_output ( * closure_id, substitution) ;
124
122
push_clauses_for_apply (
@@ -129,7 +127,6 @@ pub fn add_fn_trait_program_clauses<I: Interner>(
129
127
self_ty,
130
128
closure_inputs_and_output,
131
129
) ;
132
- Ok ( ( ) )
133
130
}
134
131
TyKind :: Function ( fn_val) if fn_val. sig . safety == Safety :: Safe && !fn_val. sig . variadic => {
135
132
let bound_ref = fn_val. clone ( ) . into_binders ( interner) ;
@@ -152,8 +149,7 @@ pub fn add_fn_trait_program_clauses<I: Interner>(
152
149
output_ty,
153
150
) ;
154
151
} ) ;
155
- Ok ( ( ) )
156
152
}
157
- _ => Ok ( ( ) ) ,
153
+ _ => { }
158
154
}
159
155
}
0 commit comments