From c82f5379de49344eb418cc6aaf5bf8c35bc4aaef Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 10 Jul 2020 18:30:32 +0200 Subject: Enable Chalk tracing in hir_ty tests --- crates/ra_hir_ty/src/traits/chalk.rs | 9 +++------ crates/ra_hir_ty/src/traits/chalk/mapping.rs | 5 ++++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir_ty/src/traits') 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; use log::debug; -use chalk_ir::{fold::shift::Shift, GenericArg, TypeName, CanonicalVarKinds}; +use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName}; use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; use hir_def::{ @@ -377,16 +377,13 @@ pub(crate) fn struct_datum_query( let variant = rust_ir::AdtVariantDatum { fields: Vec::new(), // FIXME add fields (only relevant for auto traits), }; - let struct_datum_bound = rust_ir::AdtDatumBound { - variants: vec![variant], - where_clauses, - }; + let struct_datum_bound = rust_ir::AdtDatumBound { variants: vec![variant], where_clauses }; let struct_datum = StructDatum { // FIXME set ADT kind kind: rust_ir::AdtKind::Struct, id: struct_id, binders: make_binders(struct_datum_bound, num_params), - flags + flags, }; Arc::new(struct_datum) } 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 ) }); let value = self.value.to_chalk(db); - chalk_ir::Canonical { value, binders: chalk_ir::CanonicalVarKinds::from_iter(&Interner, kinds) } + chalk_ir::Canonical { + value, + binders: chalk_ir::CanonicalVarKinds::from_iter(&Interner, kinds), + } } fn from_chalk(db: &dyn HirDatabase, canonical: chalk_ir::Canonical) -> Canonical { -- cgit v1.2.3