aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/hover.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index 1c7d1f3fd..bf08f5203 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -227,7 +227,7 @@ impl NavigationTarget {
227 let mut string = 227 let mut string =
228 node.visibility().map(|v| format!("{} ", v.syntax().text())).unwrap_or_default(); 228 node.visibility().map(|v| format!("{} ", v.syntax().text())).unwrap_or_default();
229 string.push_str(label); 229 string.push_str(label);
230 node.name()?.syntax().text().push_to(&mut string); 230 string.push_str(node.name()?.text().as_str());
231 Some(string) 231 Some(string)
232 } 232 }
233 233
@@ -241,7 +241,7 @@ impl NavigationTarget {
241 .visit(|node: &ast::ConstDef| visit_ascribed_node(node, "const ")) 241 .visit(|node: &ast::ConstDef| visit_ascribed_node(node, "const "))
242 .visit(|node: &ast::StaticDef| visit_ascribed_node(node, "static ")) 242 .visit(|node: &ast::StaticDef| visit_ascribed_node(node, "static "))
243 .visit(|node: &ast::NamedFieldDef| visit_ascribed_node(node, "")) 243 .visit(|node: &ast::NamedFieldDef| visit_ascribed_node(node, ""))
244 .visit(|node: &ast::EnumVariant| Some(node.name()?.syntax().text().to_string())) 244 .visit(|node: &ast::EnumVariant| Some(node.name()?.text().to_string()))
245 .accept(&node)? 245 .accept(&node)?
246 } 246 }
247} 247}