aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/traits
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/traits')
-rw-r--r--crates/ra_hir_ty/src/traits/chalk.rs9
-rw-r--r--crates/ra_hir_ty/src/traits/chalk/mapping.rs5
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs
index a9b39474a..e944c1976 100644
--- a/crates/ra_hir_ty/src/traits/chalk.rs
+++ b/crates/ra_hir_ty/src/traits/chalk.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
3 3
4use log::debug; 4use log::debug;
5 5
6use chalk_ir::{fold::shift::Shift, GenericArg, TypeName, CanonicalVarKinds}; 6use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName};
7use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; 7use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait};
8 8
9use hir_def::{ 9use hir_def::{
@@ -377,16 +377,13 @@ pub(crate) fn struct_datum_query(
377 let variant = rust_ir::AdtVariantDatum { 377 let variant = rust_ir::AdtVariantDatum {
378 fields: Vec::new(), // FIXME add fields (only relevant for auto traits), 378 fields: Vec::new(), // FIXME add fields (only relevant for auto traits),
379 }; 379 };
380 let struct_datum_bound = rust_ir::AdtDatumBound { 380 let struct_datum_bound = rust_ir::AdtDatumBound { variants: vec![variant], where_clauses };
381 variants: vec![variant],
382 where_clauses,
383 };
384 let struct_datum = StructDatum { 381 let struct_datum = StructDatum {
385 // FIXME set ADT kind 382 // FIXME set ADT kind
386 kind: rust_ir::AdtKind::Struct, 383 kind: rust_ir::AdtKind::Struct,
387 id: struct_id, 384 id: struct_id,
388 binders: make_binders(struct_datum_bound, num_params), 385 binders: make_binders(struct_datum_bound, num_params),
389 flags 386 flags,
390 }; 387 };
391 Arc::new(struct_datum) 388 Arc::new(struct_datum)
392} 389}
diff --git a/crates/ra_hir_ty/src/traits/chalk/mapping.rs b/crates/ra_hir_ty/src/traits/chalk/mapping.rs
index bc0c6de17..848cb6e7d 100644
--- a/crates/ra_hir_ty/src/traits/chalk/mapping.rs
+++ b/crates/ra_hir_ty/src/traits/chalk/mapping.rs
@@ -575,7 +575,10 @@ where
575 ) 575 )
576 }); 576 });
577 let value = self.value.to_chalk(db); 577 let value = self.value.to_chalk(db);
578 chalk_ir::Canonical { value, binders: chalk_ir::CanonicalVarKinds::from_iter(&Interner, kinds) } 578 chalk_ir::Canonical {
579 value,
580 binders: chalk_ir::CanonicalVarKinds::from_iter(&Interner, kinds),
581 }
579 } 582 }
580 583
581 fn from_chalk(db: &dyn HirDatabase, canonical: chalk_ir::Canonical<T::Chalk>) -> Canonical<T> { 584 fn from_chalk(db: &dyn HirDatabase, canonical: chalk_ir::Canonical<T::Chalk>) -> Canonical<T> {