diff options
author | Florian Diebold <[email protected]> | 2020-07-10 17:30:32 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-07-12 19:12:01 +0100 |
commit | c82f5379de49344eb418cc6aaf5bf8c35bc4aaef (patch) | |
tree | 7c060a12fcdb8cbd2054e064257602374c3df0cb /crates/ra_hir_ty/src/traits | |
parent | 209c492432c15b017f99dba06d5937389c1f9546 (diff) |
Enable Chalk tracing in hir_ty tests
Diffstat (limited to 'crates/ra_hir_ty/src/traits')
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk.rs | 9 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/traits/chalk/mapping.rs | 5 |
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 | ||
4 | use log::debug; | 4 | use log::debug; |
5 | 5 | ||
6 | use chalk_ir::{fold::shift::Shift, GenericArg, TypeName, CanonicalVarKinds}; | 6 | use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName}; |
7 | use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; | 7 | use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; |
8 | 8 | ||
9 | use hir_def::{ | 9 | use 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> { |