File tree 6 files changed +7
-11
lines changed
6 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ rust_library(
73
73
deps = [
74
74
"//third-party:cc" ,
75
75
"//third-party:codespan-reporting" ,
76
- "//third-party:once_cell" ,
77
76
"//third-party:proc-macro2" ,
78
77
"//third-party:quote" ,
79
78
"//third-party:scratch" ,
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ rust_library(
69
69
deps = [
70
70
"@crates.io//:cc" ,
71
71
"@crates.io//:codespan-reporting" ,
72
- "@crates.io//:once_cell" ,
73
72
"@crates.io//:proc-macro2" ,
74
73
"@crates.io//:quote" ,
75
74
"@crates.io//:scratch" ,
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ experimental-async-fn = []
21
21
[dependencies ]
22
22
cc = " 1.0.83"
23
23
codespan-reporting = " 0.11.1"
24
- once_cell = " 1.18"
25
24
proc-macro2 = { version = " 1.0.74" , default-features = false , features = [" span-locations" ] }
26
25
quote = { version = " 1.0.35" , default-features = false }
27
26
scratch = " 1.0.5"
Original file line number Diff line number Diff line change 1
1
use crate :: gen:: { CfgEvaluator , CfgResult } ;
2
- use once_cell:: sync:: OnceCell ;
3
2
use std:: borrow:: Borrow ;
4
3
use std:: cmp:: Ordering ;
5
4
use std:: collections:: { BTreeMap as Map , BTreeSet as Set } ;
6
5
use std:: env;
6
+ use std:: sync:: OnceLock ;
7
7
8
- static ENV : OnceCell < CargoEnv > = OnceCell :: new ( ) ;
8
+ static ENV : OnceLock < CargoEnv > = OnceLock :: new ( ) ;
9
9
10
10
struct CargoEnv {
11
11
features : Set < Name > ,
Original file line number Diff line number Diff line change @@ -344,12 +344,11 @@ mod r#impl {
344
344
use crate :: intern:: { intern, InternedString } ;
345
345
use crate :: syntax:: map:: UnorderedMap as Map ;
346
346
use crate :: vec:: { self , InternedVec as _} ;
347
- use once_cell:: sync:: Lazy ;
348
347
use std:: cell:: RefCell ;
349
348
use std:: fmt:: { self , Debug } ;
350
349
use std:: marker:: PhantomData ;
351
350
use std:: ops:: { Deref , DerefMut } ;
352
- use std:: sync:: { PoisonError , RwLock } ;
351
+ use std:: sync:: { LazyLock , PoisonError , RwLock } ;
353
352
354
353
struct CurrentCfg {
355
354
include_prefix : InternedString ,
@@ -378,7 +377,8 @@ mod r#impl {
378
377
}
379
378
}
380
379
381
- static CURRENT : Lazy < RwLock < CurrentCfg > > = Lazy :: new ( || RwLock :: new ( CurrentCfg :: default ( ) ) ) ;
380
+ static CURRENT : LazyLock < RwLock < CurrentCfg > > =
381
+ LazyLock :: new ( || RwLock :: new ( CurrentCfg :: default ( ) ) ) ;
382
382
383
383
thread_local ! {
384
384
// FIXME: If https://github.com/rust-lang/rust/issues/77425 is resolved,
Original file line number Diff line number Diff line change 1
1
use crate :: syntax:: set:: UnorderedSet as Set ;
2
- use once_cell:: sync:: OnceCell ;
3
- use std:: sync:: { Mutex , PoisonError } ;
2
+ use std:: sync:: { Mutex , OnceLock , PoisonError } ;
4
3
5
4
#[ derive( Copy , Clone , Default ) ]
6
5
pub ( crate ) struct InternedString ( & ' static str ) ;
@@ -12,7 +11,7 @@ impl InternedString {
12
11
}
13
12
14
13
pub ( crate ) fn intern ( s : & str ) -> InternedString {
15
- static INTERN : OnceCell < Mutex < Set < & ' static str > > > = OnceCell :: new ( ) ;
14
+ static INTERN : OnceLock < Mutex < Set < & ' static str > > > = OnceLock :: new ( ) ;
16
15
17
16
let mut set = INTERN
18
17
. get_or_init ( || Mutex :: new ( Set :: new ( ) ) )
You can’t perform that action at this time.
0 commit comments