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> {
659
659
660
660
/// Checks if renaming `renamed` to `new_name` may introduce conflicts with other locals,
661
661
/// 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 > {
663
663
let body = self . db . body ( to_be_renamed. parent ) ;
664
664
let resolver = to_be_renamed. parent . resolver ( self . db ) ;
665
665
let starting_expr =
@@ -668,7 +668,7 @@ impl<'db> SemanticsImpl<'db> {
668
668
body : & body,
669
669
conflicts : FxHashSet :: default ( ) ,
670
670
db : self . db ,
671
- new_name : Symbol :: intern ( new_name) ,
671
+ new_name : new_name. symbol ( ) . clone ( ) ,
672
672
old_name : to_be_renamed. name ( self . db ) . symbol ( ) . clone ( ) ,
673
673
owner : to_be_renamed. parent ,
674
674
to_be_renamed : to_be_renamed. binding_id ,
You can’t perform that action at this time.
0 commit comments