aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r--crates/ra_hir/src/code_model.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 9d0db8024..e5bfad3ca 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -288,7 +288,7 @@ pub struct Struct {
288 288
289impl Struct { 289impl Struct {
290 pub fn module(self, db: &impl DefDatabase) -> Module { 290 pub fn module(self, db: &impl DefDatabase) -> Module {
291 Module { id: self.id.module(db) } 291 Module { id: self.id.0.module(db) }
292 } 292 }
293 293
294 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> { 294 pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
@@ -296,11 +296,11 @@ impl Struct {
296 } 296 }
297 297
298 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 298 pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
299 db.struct_data(self.id).name.clone() 299 db.struct_data(self.id.into()).name.clone()
300 } 300 }
301 301
302 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> { 302 pub fn fields(self, db: &impl HirDatabase) -> Vec<StructField> {
303 db.struct_data(self.id) 303 db.struct_data(self.id.into())
304 .variant_data 304 .variant_data
305 .fields() 305 .fields()
306 .into_iter() 306 .into_iter()
@@ -310,7 +310,7 @@ impl Struct {
310 } 310 }
311 311
312 pub fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> { 312 pub fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
313 db.struct_data(self.id) 313 db.struct_data(self.id.into())
314 .variant_data 314 .variant_data
315 .fields() 315 .fields()
316 .into_iter() 316 .into_iter()
@@ -346,11 +346,11 @@ pub struct Union {
346 346
347impl Union { 347impl Union {
348 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 348 pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
349 db.union_data(self.id).name.clone() 349 db.struct_data(self.id.into()).name.clone()
350 } 350 }
351 351
352 pub fn module(self, db: &impl HirDatabase) -> Module { 352 pub fn module(self, db: &impl HirDatabase) -> Module {
353 Module { id: self.id.module(db) } 353 Module { id: self.id.0.module(db) }
354 } 354 }
355 355
356 pub fn ty(self, db: &impl HirDatabase) -> Ty { 356 pub fn ty(self, db: &impl HirDatabase) -> Ty {