mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add a better text for hover and stop duplicating work done in approximatelly_resolve_symbol
This commit is contained in:
parent
6d548d944f
commit
f88e0700e6
7 changed files with 98 additions and 30 deletions
|
@ -236,7 +236,7 @@ impl Analysis {
|
|||
pub fn approximately_resolve_symbol(
|
||||
&self,
|
||||
position: FilePosition,
|
||||
) -> Cancelable<Vec<(FileId, FileSymbol)>> {
|
||||
) -> Cancelable<Option<(TextRange, Vec<(FileId, FileSymbol)>)>> {
|
||||
self.imp.approximately_resolve_symbol(position)
|
||||
}
|
||||
pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> {
|
||||
|
@ -249,6 +249,9 @@ impl Analysis {
|
|||
) -> Cancelable<Option<String>> {
|
||||
self.imp.doc_comment_for(file_id, symbol)
|
||||
}
|
||||
pub fn doc_text_for(&self, file_id: FileId, symbol: FileSymbol) -> Cancelable<Option<String>> {
|
||||
self.imp.doc_text_for(file_id, symbol)
|
||||
}
|
||||
pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<(FileId, FileSymbol)>> {
|
||||
self.imp.parent_module(position)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue