mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
refactor: conpare text of name_ref instead of syntax name_ref
This commit is contained in:
parent
b77072075c
commit
feaf647b06
1 changed files with 4 additions and 1 deletions
|
|
@ -322,7 +322,10 @@ fn create_replacement(
|
|||
|
||||
replacements.push((syntax.clone(), new_lifetime.syntax().clone_for_update()));
|
||||
}
|
||||
} else if let Some(replacement_syntax) = const_and_type_map.0.get(syntax_str) {
|
||||
} else if let Some(name_ref) = ast::NameRef::cast(syntax.clone()) {
|
||||
let Some(replacement_syntax) = const_and_type_map.0.get(&name_ref.to_string()) else {
|
||||
continue;
|
||||
};
|
||||
let new_string = replacement_syntax.to_string();
|
||||
let new = if new_string == "_" {
|
||||
make::wildcard_pat().syntax().clone_for_update()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue