Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/quote.rs')
-rw-r--r--crates/hir-expand/src/quote.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir-expand/src/quote.rs b/crates/hir-expand/src/quote.rs
index 9bdd75f9d2..a3b84afd2a 100644
--- a/crates/hir-expand/src/quote.rs
+++ b/crates/hir-expand/src/quote.rs
@@ -4,6 +4,10 @@ use span::Span;
use crate::name::Name;
+pub(crate) fn dollar_crate(span: Span) -> tt::Ident<Span> {
+ tt::Ident { text: syntax::SmolStr::new_inline("$crate"), span }
+}
+
// A helper macro quote macro
// FIXME:
// 1. Not all puncts are handled