aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/test_db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/test_db.rs')
-rw-r--r--crates/hir_def/src/test_db.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir_def/src/test_db.rs b/crates/hir_def/src/test_db.rs
index 10977761c..dd36106f8 100644
--- a/crates/hir_def/src/test_db.rs
+++ b/crates/hir_def/src/test_db.rs
@@ -265,4 +265,17 @@ impl TestDB {
265 265
266 assert_eq!(annotations, actual); 266 assert_eq!(annotations, actual);
267 } 267 }
268
269 pub(crate) fn check_no_diagnostics(&self) {
270 let db: &TestDB = self;
271 let annotations = db.extract_annotations();
272 assert!(annotations.is_empty());
273
274 let mut has_diagnostics = false;
275 db.diagnostics(|_| {
276 has_diagnostics = true;
277 });
278
279 assert!(!has_diagnostics);
280 }
268} 281}