aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-30 20:18:43 +0000
committerFlorian Diebold <[email protected]>2020-01-11 22:33:04 +0000
commitb62292e8f9e28410741059ebb25133b8e1e8638a (patch)
tree3b46e66404a6b99040649f46517e0fb965f86fcd /crates/ra_hir_expand
parent2c50f996b68e9a24a564de728ffcc13d896afc1c (diff)
basics working
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r--crates/ra_hir_expand/src/name.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs
index b3fa1efba..a4d912b99 100644
--- a/crates/ra_hir_expand/src/name.rs
+++ b/crates/ra_hir_expand/src/name.rs
@@ -37,6 +37,10 @@ impl Name {
37 Name(Repr::TupleField(idx)) 37 Name(Repr::TupleField(idx))
38 } 38 }
39 39
40 pub fn for_crate_dependency(dep: &ra_db::Dependency) -> Name {
41 Name::new_text(dep.name.clone())
42 }
43
40 /// Shortcut to create inline plain text name 44 /// Shortcut to create inline plain text name
41 const fn new_inline_ascii(text: &[u8]) -> Name { 45 const fn new_inline_ascii(text: &[u8]) -> Name {
42 Name::new_text(SmolStr::new_inline_from_ascii(text.len(), text)) 46 Name::new_text(SmolStr::new_inline_from_ascii(text.len(), text))