mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Decouple
This commit is contained in:
parent
eb53aa37a3
commit
00684d708b
8 changed files with 53 additions and 49 deletions
|
@ -9,10 +9,16 @@ use hir_def::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
ty::TypableDef, Adt, AssocItem, Const, DefWithBody, EnumVariant, Function, GenericDef,
|
||||
ty::TypableDef, Adt, AssocItem, Const, Crate, DefWithBody, EnumVariant, Function, GenericDef,
|
||||
ModuleDef, Static, TypeAlias,
|
||||
};
|
||||
|
||||
impl From<ra_db::CrateId> for Crate {
|
||||
fn from(crate_id: ra_db::CrateId) -> Self {
|
||||
Crate { crate_id }
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! from_id {
|
||||
($(($id:path, $ty:path)),*) => {$(
|
||||
impl From<$id> for $ty {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue