mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Move doc comment handling into ide-db
This commit is contained in:
parent
0bf0563a00
commit
b1575528c0
26 changed files with 342 additions and 266 deletions
|
@ -4,14 +4,15 @@ use std::fmt;
|
|||
|
||||
use either::Either;
|
||||
use hir::{
|
||||
symbols::FileSymbol, AssocItem, Documentation, FieldSource, HasAttrs, HasContainer, HasSource,
|
||||
HirDisplay, HirFileId, InFile, LocalSource, ModuleSource,
|
||||
symbols::FileSymbol, AssocItem, FieldSource, HasContainer, HasSource, HirDisplay, HirFileId,
|
||||
InFile, LocalSource, ModuleSource,
|
||||
};
|
||||
use ide_db::{
|
||||
base_db::{FileId, FileRange},
|
||||
SymbolKind,
|
||||
defs::Definition,
|
||||
documentation::{Documentation, HasDocs},
|
||||
RootDatabase, SymbolKind,
|
||||
};
|
||||
use ide_db::{defs::Definition, RootDatabase};
|
||||
use stdx::never;
|
||||
use syntax::{
|
||||
ast::{self, HasName},
|
||||
|
@ -327,7 +328,7 @@ impl ToNavFromAst for hir::TraitAlias {
|
|||
|
||||
impl<D> TryToNav for D
|
||||
where
|
||||
D: HasSource + ToNavFromAst + Copy + HasAttrs + HirDisplay,
|
||||
D: HasSource + ToNavFromAst + Copy + HasDocs + HirDisplay,
|
||||
D::Ast: ast::HasName,
|
||||
{
|
||||
fn try_to_nav(&self, db: &RootDatabase) -> Option<NavigationTarget> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue