From 679bb21633d6bbbf04b4cba5cb70f73cc5f5de19 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 19 Jun 2021 18:17:57 +0200 Subject: Add coverage mark for block local impls --- crates/hir_ty/src/chalk_db.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/hir_ty/src/chalk_db.rs b/crates/hir_ty/src/chalk_db.rs index a4c09c742..a55b99de0 100644 --- a/crates/hir_ty/src/chalk_db.rs +++ b/crates/hir_ty/src/chalk_db.rs @@ -2,6 +2,7 @@ //! about the code that Chalk needs. use std::sync::Arc; +use cov_mark::hit; use log::debug; use chalk_ir::{cast::Cast, fold::shift::Shift, CanonicalVarKinds}; @@ -106,7 +107,9 @@ impl<'a> chalk_solve::RustIrDatabase for ChalkContext<'a> { }; fn local_impls(db: &dyn HirDatabase, module: ModuleId) -> Option> { - db.trait_impls_in_block(module.containing_block()?) + let block = module.containing_block()?; + hit!(block_local_impls); + db.trait_impls_in_block(block) } // Note: Since we're using impls_for_trait, only impls where the trait -- cgit v1.2.3