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
|
@ -5,8 +5,8 @@ use std::mem;
|
|||
use either::Either;
|
||||
use hir::{InFile, Semantics};
|
||||
use ide_db::{
|
||||
active_parameter::ActiveParameter, base_db::FileId, defs::Definition, rust_doc::is_rust_fence,
|
||||
SymbolKind,
|
||||
active_parameter::ActiveParameter, base_db::FileId, defs::Definition,
|
||||
documentation::docs_with_rangemap, rust_doc::is_rust_fence, SymbolKind,
|
||||
};
|
||||
use syntax::{
|
||||
ast::{self, AstNode, IsString, QuoteOffsets},
|
||||
|
@ -118,7 +118,7 @@ pub(super) fn doc_comment(
|
|||
let src_file_id = src_file_id.into();
|
||||
|
||||
// Extract intra-doc links and emit highlights for them.
|
||||
if let Some((docs, doc_mapping)) = attributes.docs_with_rangemap(sema.db) {
|
||||
if let Some((docs, doc_mapping)) = docs_with_rangemap(sema.db, &attributes) {
|
||||
extract_definitions_from_docs(&docs)
|
||||
.into_iter()
|
||||
.filter_map(|(range, link, ns)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue