mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Rustdocs fixes
This commit is contained in:
parent
f75f07019b
commit
7b145bd99c
2 changed files with 4 additions and 2 deletions
|
@ -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) {
|
fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) {
|
||||||
for child in node.children() {
|
for child in node.children() {
|
||||||
match_ast! {
|
match_ast! {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
//! A module with ide helpers for high-level ide features.
|
||||||
use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait};
|
use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait};
|
||||||
use ide_db::RootDatabase;
|
use ide_db::RootDatabase;
|
||||||
use syntax::ast::{self, make};
|
use syntax::ast::{self, make};
|
||||||
|
|
||||||
pub mod insert_use;
|
pub mod insert_use;
|
||||||
|
|
||||||
|
/// Converts the mod path struct into its ast representation.
|
||||||
pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path {
|
pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path {
|
||||||
let _p = profile::span("mod_path_to_ast");
|
let _p = profile::span("mod_path_to_ast");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue