aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r--crates/hir_ty/src/traits/chalk/mapping.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs
index 297ddeabd..c17c19638 100644
--- a/crates/hir_ty/src/traits/chalk/mapping.rs
+++ b/crates/hir_ty/src/traits/chalk/mapping.rs
@@ -55,7 +55,7 @@ impl ToChalk for Ty {
55 chalk_ir::TyKind::OpaqueType(id, substitution).intern(&Interner) 55 chalk_ir::TyKind::OpaqueType(id, substitution).intern(&Interner)
56 } 56 }
57 57
58 Ty::ForeignType(type_alias, _) => { 58 Ty::ForeignType(type_alias) => {
59 let foreign_type = TypeAliasAsForeignType(type_alias); 59 let foreign_type = TypeAliasAsForeignType(type_alias);
60 let foreign_type_id = foreign_type.to_chalk(db); 60 let foreign_type_id = foreign_type.to_chalk(db);
61 chalk_ir::TyKind::Foreign(foreign_type_id).intern(&Interner) 61 chalk_ir::TyKind::Foreign(foreign_type_id).intern(&Interner)
@@ -63,7 +63,7 @@ impl ToChalk for Ty {
63 63
64 Ty::Scalar(scalar) => chalk_ir::TyKind::Scalar(scalar).intern(&Interner), 64 Ty::Scalar(scalar) => chalk_ir::TyKind::Scalar(scalar).intern(&Interner),
65 65
66 Ty::Tuple { cardinality, substs } => { 66 Ty::Tuple(cardinality, substs) => {
67 let substitution = substs.to_chalk(db); 67 let substitution = substs.to_chalk(db);
68 chalk_ir::TyKind::Tuple(cardinality.into(), substitution).intern(&Interner) 68 chalk_ir::TyKind::Tuple(cardinality.into(), substitution).intern(&Interner)
69 } 69 }
@@ -199,7 +199,7 @@ impl ToChalk for Ty {
199 199
200 chalk_ir::TyKind::Scalar(scalar) => Ty::Scalar(scalar), 200 chalk_ir::TyKind::Scalar(scalar) => Ty::Scalar(scalar),
201 chalk_ir::TyKind::Tuple(cardinality, subst) => { 201 chalk_ir::TyKind::Tuple(cardinality, subst) => {
202 Ty::Tuple { cardinality: cardinality as u16, substs: from_chalk(db, subst) } 202 Ty::Tuple(cardinality, from_chalk(db, subst))
203 } 203 }
204 chalk_ir::TyKind::Raw(mutability, ty) => { 204 chalk_ir::TyKind::Raw(mutability, ty) => {
205 Ty::RawPtr(from_chalk(db, mutability), Substs::single(from_chalk(db, ty))) 205 Ty::RawPtr(from_chalk(db, mutability), Substs::single(from_chalk(db, ty)))
@@ -221,10 +221,9 @@ impl ToChalk for Ty {
221 Ty::Closure { def, expr, substs: from_chalk(db, subst) } 221 Ty::Closure { def, expr, substs: from_chalk(db, subst) }
222 } 222 }
223 223
224 chalk_ir::TyKind::Foreign(foreign_def_id) => Ty::ForeignType( 224 chalk_ir::TyKind::Foreign(foreign_def_id) => {
225 from_chalk::<TypeAliasAsForeignType, _>(db, foreign_def_id).0, 225 Ty::ForeignType(from_chalk::<TypeAliasAsForeignType, _>(db, foreign_def_id).0)
226 Substs::empty(), 226 }
227 ),
228 chalk_ir::TyKind::Generator(_, _) => unimplemented!(), // FIXME 227 chalk_ir::TyKind::Generator(_, _) => unimplemented!(), // FIXME
229 chalk_ir::TyKind::GeneratorWitness(_, _) => unimplemented!(), // FIXME 228 chalk_ir::TyKind::GeneratorWitness(_, _) => unimplemented!(), // FIXME
230 } 229 }