diff options
author | Lukas Wirth <[email protected]> | 2021-03-01 20:57:39 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-03-04 18:38:02 +0000 |
commit | 50e01d2bc7429d718e0783d75458a6a047ee2b70 (patch) | |
tree | 5043387dfce7e3fc96777ce5983048f0d2d450e5 /crates/hir | |
parent | 16a76aa158d0898d6a46d7bba7310150555a69b9 (diff) |
Use chalk_ir::AdtId
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/code_model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index fc1a74641..7656db974 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs | |||
@@ -1700,7 +1700,7 @@ impl Type { | |||
1700 | 1700 | ||
1701 | pub fn is_packed(&self, db: &dyn HirDatabase) -> bool { | 1701 | pub fn is_packed(&self, db: &dyn HirDatabase) -> bool { |
1702 | let adt_id = match self.ty.value { | 1702 | let adt_id = match self.ty.value { |
1703 | Ty::Adt(adt_id, ..) => adt_id, | 1703 | Ty::Adt(hir_ty::AdtId(adt_id), ..) => adt_id, |
1704 | _ => return false, | 1704 | _ => return false, |
1705 | }; | 1705 | }; |
1706 | 1706 | ||
@@ -1728,8 +1728,8 @@ impl Type { | |||
1728 | 1728 | ||
1729 | pub fn fields(&self, db: &dyn HirDatabase) -> Vec<(Field, Type)> { | 1729 | pub fn fields(&self, db: &dyn HirDatabase) -> Vec<(Field, Type)> { |
1730 | let (variant_id, substs) = match self.ty.value { | 1730 | let (variant_id, substs) = match self.ty.value { |
1731 | Ty::Adt(AdtId::StructId(s), ref substs) => (s.into(), substs), | 1731 | Ty::Adt(hir_ty::AdtId(AdtId::StructId(s)), ref substs) => (s.into(), substs), |
1732 | Ty::Adt(AdtId::UnionId(u), ref substs) => (u.into(), substs), | 1732 | Ty::Adt(hir_ty::AdtId(AdtId::UnionId(u)), ref substs) => (u.into(), substs), |
1733 | _ => return Vec::new(), | 1733 | _ => return Vec::new(), |
1734 | }; | 1734 | }; |
1735 | 1735 | ||