@@ -119,7 +119,7 @@ fn try_register_specified_impl(
119
119
arg_concrete_trait : & GenericTraitRef ,
120
120
impl_params : & ImplParams ,
121
121
) -> Result < ( ) , ResolveError > {
122
- let target_poly_impl = match & using. name {
122
+ let target_param = match & using. name {
123
123
Some ( name_and_source) => name_and_source. as_ref ( ) ,
124
124
None => Sourced :: new (
125
125
callee_func
@@ -146,24 +146,23 @@ fn try_register_specified_impl(
146
146
}
147
147
. clone ( ) ;
148
148
149
- let Some ( param_generic_trait) = impl_params. params . get ( target_poly_impl. inner ( ) . as_str ( ) )
150
- else {
149
+ let Some ( param_generic_trait) = impl_params. params . get ( target_param. inner ( ) . as_str ( ) ) else {
151
150
return Err ( ResolveError :: other (
152
151
format ! (
153
152
"No implementation parameter named '${}' exists on callee" ,
154
- target_poly_impl . inner( )
153
+ target_param . inner( )
155
154
) ,
156
- target_poly_impl . source ,
155
+ target_param . source ,
157
156
) ) ;
158
157
} ;
159
158
160
- if !used_names. insert ( target_poly_impl . inner ( ) . to_string ( ) ) {
159
+ if !used_names. insert ( target_param . inner ( ) . to_string ( ) ) {
161
160
return Err ( ResolveError :: other (
162
161
format ! (
163
162
"Implementation for '${}' was already specified" ,
164
- target_poly_impl . inner( )
163
+ target_param . inner( )
165
164
) ,
166
- target_poly_impl . source ,
165
+ target_param . source ,
167
166
) ) ;
168
167
}
169
168
@@ -183,15 +182,15 @@ fn try_register_specified_impl(
183
182
callee
184
183
. recipe
185
184
. polymorphs
186
- . insert ( target_poly_impl . inner ( ) . to_string ( ) , poly_value)
185
+ . insert ( target_param . inner ( ) . to_string ( ) , poly_value)
187
186
. is_some ( )
188
187
. then ( || {
189
188
ResolveError :: other (
190
189
format ! (
191
190
"Multiple implementations were specified for implementation parameter '${}'" ,
192
- target_poly_impl . inner( )
191
+ target_param . inner( )
193
192
) ,
194
- target_poly_impl . source ,
193
+ target_param . source ,
195
194
)
196
195
} )
197
196
. map_or ( Ok ( ( ) ) , Err )
0 commit comments