Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/mod_path.rs')
| -rw-r--r-- | crates/hir-expand/src/mod_path.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/hir-expand/src/mod_path.rs b/crates/hir-expand/src/mod_path.rs index 876919f3ed..4f2f9ec40d 100644 --- a/crates/hir-expand/src/mod_path.rs +++ b/crates/hir-expand/src/mod_path.rs @@ -414,3 +414,14 @@ macro_rules! __path { } pub use crate::__path as path; + +#[macro_export] +macro_rules! __tool_path { + ($start:ident $(:: $seg:ident)*) => ({ + $crate::mod_path::ModPath::from_segments($crate::mod_path::PathKind::Plain, vec![ + $crate::name::Name::new_symbol_root(intern::sym::rust_analyzer.clone()), $crate::name::Name::new_symbol_root(intern::sym::$start.clone()), $($crate::name::Name::new_symbol_root(intern::sym::$seg.clone()),)* + ]) + }); +} + +pub use crate::__tool_path as tool_path; |