mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
always produce source for import
This commit is contained in:
parent
0a758a2c48
commit
0de89f786f
6 changed files with 70 additions and 29 deletions
|
@ -4,7 +4,7 @@ use ra_db::{CrateId, SourceRootId, Edition};
|
|||
use ra_syntax::{ast::self, TreeArc};
|
||||
|
||||
use crate::{
|
||||
Name, ScopesWithSourceMap, Ty, HirFileId,
|
||||
Name, ScopesWithSourceMap, Ty, HirFileId, ImportSource,
|
||||
HirDatabase, DefDatabase,
|
||||
type_ref::TypeRef,
|
||||
nameres::{ModuleScope, Namespace, ImportId, CrateModuleId},
|
||||
|
@ -117,7 +117,7 @@ impl Module {
|
|||
}
|
||||
|
||||
/// Returns the syntax of the last path segment corresponding to this import
|
||||
pub fn import_source(&self, db: &impl HirDatabase, import: ImportId) -> TreeArc<ast::UseTree> {
|
||||
pub fn import_source(&self, db: &impl HirDatabase, import: ImportId) -> ImportSource {
|
||||
self.import_source_impl(db, import)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue