File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ fn rename_reference(
271271 }
272272 }
273273
274- let def = convert_to_trait_def ( def, sema) ;
274+ let def = convert_to_def_in_trait ( def, sema) ;
275275 let usages = def. usages ( sema) . all ( ) ;
276276
277277 if !usages. is_empty ( ) && ident_kind == IdentifierKind :: Underscore {
@@ -298,7 +298,10 @@ fn rename_reference(
298298 Ok ( source_change)
299299}
300300
301- pub ( crate ) fn convert_to_trait_def ( def : Definition , sema : & Semantics < RootDatabase > ) -> Definition {
301+ pub ( crate ) fn convert_to_def_in_trait (
302+ def : Definition ,
303+ sema : & Semantics < RootDatabase > ,
304+ ) -> Definition {
302305 // HACK: resolve trait impl items to the item def of the trait definition
303306 // so that we properly resolve all trait item references
304307 let assoc_item = match def {
Original file line number Diff line number Diff line change @@ -620,7 +620,7 @@ impl<'a> FindUsages<'a> {
620620 sink ( file_id, reference)
621621 }
622622 Some ( NameRefClass :: Definition ( def) )
623- if crate :: rename:: convert_to_trait_def ( def, self . sema ) == self . def =>
623+ if crate :: rename:: convert_to_def_in_trait ( def, self . sema ) == self . def =>
624624 {
625625 let FileRange { file_id, range } = self . sema . original_range ( name_ref. syntax ( ) ) ;
626626 let reference = FileReference {
You can’t perform that action at this time.
0 commit comments