aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/assists/src/handlers/replace_qualified_name_with_use.rs2
-rw-r--r--crates/ide_helpers/src/lib.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs
index 9b8caacd9..5e5c41a6f 100644
--- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs
+++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs
@@ -51,7 +51,7 @@ pub(crate) fn replace_qualified_name_with_use(
51 ) 51 )
52} 52}
53 53
54/// Adds replacements to `re` that shorten `path` in all descendants of `node`.g 54/// Adds replacements to `re` that shorten `path` in all descendants of `node`.
55fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) { 55fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) {
56 for child in node.children() { 56 for child in node.children() {
57 match_ast! { 57 match_ast! {
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 {