File tree Expand file tree Collapse file tree 3 files changed +161
-115
lines changed
src/tools/rust-analyzer/crates Expand file tree Collapse file tree 3 files changed +161
-115
lines changed Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ impl<'db> SemanticsImpl<'db> {
659659
660660 /// Checks if renaming `renamed` to `new_name` may introduce conflicts with other locals,
661661 /// and returns the conflicting locals.
662- pub fn rename_conflicts ( & self , to_be_renamed : & Local , new_name : & str ) -> Vec < Local > {
662+ pub fn rename_conflicts ( & self , to_be_renamed : & Local , new_name : & Name ) -> Vec < Local > {
663663 let body = self . db . body ( to_be_renamed. parent ) ;
664664 let resolver = to_be_renamed. parent . resolver ( self . db ) ;
665665 let starting_expr =
@@ -668,7 +668,7 @@ impl<'db> SemanticsImpl<'db> {
668668 body : & body,
669669 conflicts : FxHashSet :: default ( ) ,
670670 db : self . db ,
671- new_name : Symbol :: intern ( new_name) ,
671+ new_name : new_name. symbol ( ) . clone ( ) ,
672672 old_name : to_be_renamed. name ( self . db ) . symbol ( ) . clone ( ) ,
673673 owner : to_be_renamed. parent ,
674674 to_be_renamed : to_be_renamed. binding_id ,
You can’t perform that action at this time.
0 commit comments