Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/data/adt.rs')
-rw-r--r--crates/hir-def/src/data/adt.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir-def/src/data/adt.rs b/crates/hir-def/src/data/adt.rs
index 28992ec600..bf8f5024c2 100644
--- a/crates/hir-def/src/data/adt.rs
+++ b/crates/hir-def/src/data/adt.rs
@@ -1,6 +1,6 @@
//! Defines hir-level representation of structs, enums and unions
-use base_db::CrateId;
+use base_db::Crate;
use bitflags::bitflags;
use cfg::CfgOptions;
use either::Either;
@@ -90,7 +90,7 @@ pub struct FieldData {
fn repr_from_value(
db: &dyn DefDatabase,
- krate: CrateId,
+ krate: Crate,
item_tree: &ItemTree,
of: AttrOwner,
) -> Option<ReprOptions> {
@@ -222,7 +222,7 @@ impl StructData {
loc.container.local_id,
loc.id.tree_id(),
&item_tree,
- &db.crate_graph()[krate].cfg_options,
+ krate.cfg_options(db),
FieldParent::Struct(loc.id.value),
&strukt.fields,
None,
@@ -274,7 +274,7 @@ impl StructData {
loc.container.local_id,
loc.id.tree_id(),
&item_tree,
- &db.crate_graph()[krate].cfg_options,
+ krate.cfg_options(db),
FieldParent::Union(loc.id.value),
&union.fields,
None,
@@ -377,7 +377,7 @@ impl EnumVariantData {
container.local_id,
loc.id.tree_id(),
&item_tree,
- &db.crate_graph()[krate].cfg_options,
+ krate.cfg_options(db),
FieldParent::Variant(loc.id.value),
&variant.fields,
Some(item_tree[loc.parent.lookup(db).id.value].visibility),
@@ -448,7 +448,7 @@ pub enum StructKind {
fn lower_fields(
db: &dyn DefDatabase,
- krate: CrateId,
+ krate: Crate,
container: LocalModuleId,
tree_id: TreeId,
item_tree: &ItemTree,