From 7b145bd99c855b2f4a15835a2298dde504b04d8f Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 27 Nov 2020 12:26:20 +0200 Subject: Rustdocs fixes --- crates/assists/src/handlers/replace_qualified_name_with_use.rs | 2 +- crates/ide_helpers/src/lib.rs | 4 +++- 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( ) } -/// Adds replacements to `re` that shorten `path` in all descendants of `node`.g +/// Adds replacements to `re` that shorten `path` in all descendants of `node`. fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) { for child in node.children() { 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 @@ +//! A module with ide helpers for high-level ide features. use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait}; use ide_db::RootDatabase; use syntax::ast::{self, make}; pub mod insert_use; +/// Converts the mod path struct into its ast representation. pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path { let _p = profile::span("mod_path_to_ast"); - + let mut segments = Vec::new(); let mut is_abs = false; match path.kind { -- cgit v1.2.3