aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_helpers/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_helpers/src')
-rw-r--r--crates/ide_helpers/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide_helpers/src/lib.rs b/crates/ide_helpers/src/lib.rs
index 069cb2bdd..ad4404b19 100644
--- a/crates/ide_helpers/src/lib.rs
+++ b/crates/ide_helpers/src/lib.rs
@@ -1,12 +1,14 @@
1//! A module with ide helpers for high-level ide features.
1use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait}; 2use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait};
2use ide_db::RootDatabase; 3use ide_db::RootDatabase;
3use syntax::ast::{self, make}; 4use syntax::ast::{self, make};
4 5
5pub mod insert_use; 6pub mod insert_use;
6 7
8/// Converts the mod path struct into its ast representation.
7pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path { 9pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path {
8 let _p = profile::span("mod_path_to_ast"); 10 let _p = profile::span("mod_path_to_ast");
9 11
10 let mut segments = Vec::new(); 12 let mut segments = Vec::new();
11 let mut is_abs = false; 13 let mut is_abs = false;
12 match path.kind { 14 match path.kind {