We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc9bd0 commit 1d5a582Copy full SHA for 1d5a582
src/tools/rust-analyzer/crates/ide-assists/src/handlers/inline_type_alias.rs
@@ -322,7 +322,10 @@ fn create_replacement(
322
323
replacements.push((syntax.clone(), new_lifetime.syntax().clone_for_update()));
324
}
325
- } 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()) {
326
+ let Some(replacement_syntax) = const_and_type_map.0.get(&name_ref.to_string()) else {
327
+ continue;
328
+ };
329
let new_string = replacement_syntax.to_string();
330
let new = if new_string == "_" {
331
make::wildcard_pat().syntax().clone_for_update()
0 commit comments