mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Emit moniker in lsif
This commit is contained in:
parent
a07e406d06
commit
30ed7fac27
12 changed files with 589 additions and 18 deletions
|
@ -34,7 +34,7 @@ mod display;
|
|||
use std::{iter, ops::ControlFlow, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use base_db::{CrateDisplayName, CrateId, Edition, FileId};
|
||||
use base_db::{CrateDisplayName, CrateId, CrateOrigin, Edition, FileId};
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
adt::{ReprKind, VariantData},
|
||||
|
@ -144,6 +144,10 @@ pub struct CrateDependency {
|
|||
}
|
||||
|
||||
impl Crate {
|
||||
pub fn origin(self, db: &dyn HirDatabase) -> CrateOrigin {
|
||||
db.crate_graph()[self.id].origin.clone()
|
||||
}
|
||||
|
||||
pub fn dependencies(self, db: &dyn HirDatabase) -> Vec<CrateDependency> {
|
||||
db.crate_graph()[self.id]
|
||||
.dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue