File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,14 +273,14 @@ impl Environment<'_> {
273273 /// original names for them.
274274 pub fn resolve_deferred_type_variable_aliases ( & mut self ) {
275275 for ( source_id, type_) in self . deferred_type_variable_aliases . drain ( ..) {
276- if let Some ( alias) = self . names . get_type_variable ( source_id) . cloned ( ) {
276+ if let Some ( alias) = self . names . get_type_variable ( source_id) {
277277 let final_id = Self :: resolve_type_var_id ( & type_) ;
278278 if let Some ( id) = final_id {
279279 // Only register if the target doesn't already have a name.
280280 // This avoids overwriting user-provided names (e.g. from
281281 // annotations) with names from instantiated type parameters.
282282 if self . names . get_type_variable ( id) . is_none ( ) {
283- self . names . type_variable_in_scope ( id, alias) ;
283+ self . names . type_variable_in_scope ( id, alias. clone ( ) ) ;
284284 }
285285 }
286286 }
You can’t perform that action at this time.
0 commit comments