aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src
diff options
context:
space:
mode:
authorAnatol Liu <[email protected]>2020-11-13 01:48:07 +0000
committerAnatol Liu <[email protected]>2020-11-13 01:48:07 +0000
commitb1b7727e046b4b25dcca034ee767a7fc3238409d (patch)
treec1942b7af1e73b139d2c62d1d81e8d6749dc8cd2 /crates/hir_ty/src
parent111cc34c8f181315f4dcfa85c616d54d47eff0b9 (diff)
add open Cargo.toml action
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r--crates/hir_ty/src/tests.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/hir_ty/src/tests.rs b/crates/hir_ty/src/tests.rs
index 104ef334c..0a400cb70 100644
--- a/crates/hir_ty/src/tests.rs
+++ b/crates/hir_ty/src/tests.rs
@@ -22,7 +22,8 @@ use hir_def::{
22 AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId, 22 AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId,
23}; 23};
24use hir_expand::{db::AstDatabase, InFile}; 24use hir_expand::{db::AstDatabase, InFile};
25use stdx::{format_to, RacyFlag}; 25use once_cell::race::OnceBool;
26use stdx::format_to;
26use syntax::{ 27use syntax::{
27 algo, 28 algo,
28 ast::{self, AstNode}, 29 ast::{self, AstNode},
@@ -40,8 +41,8 @@ use crate::{
40// `env UPDATE_EXPECT=1 cargo test -p hir_ty` to update the snapshots. 41// `env UPDATE_EXPECT=1 cargo test -p hir_ty` to update the snapshots.
41 42
42fn setup_tracing() -> Option<tracing::subscriber::DefaultGuard> { 43fn setup_tracing() -> Option<tracing::subscriber::DefaultGuard> {
43 static ENABLE: RacyFlag = RacyFlag::new(); 44 static ENABLE: OnceBool = OnceBool::new();
44 if !ENABLE.get(|| env::var("CHALK_DEBUG").is_ok()) { 45 if !ENABLE.get_or_init(|| env::var("CHALK_DEBUG").is_ok()) {
45 return None; 46 return None;
46 } 47 }
47 48