File tree 4 files changed +5
-5
lines changed
rustc_data_structures/src/sync
rustc_errors/src/markdown
library/proc_macro/src/bridge
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ pub struct Registry(Arc<RegistryData>);
42
42
thread_local ! {
43
43
/// The registry associated with the thread.
44
44
/// This allows the `WorkerLocal` type to clone the registry in its constructor.
45
- static REGISTRY : OnceCell <Registry > = OnceCell :: new( ) ;
45
+ static REGISTRY : OnceCell <Registry > = const { OnceCell :: new( ) } ;
46
46
}
47
47
48
48
struct ThreadData {
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ const DEFAULT_COLUMN_WIDTH: usize = 140;
9
9
10
10
thread_local ! {
11
11
/// Track the position of viewable characters in our buffer
12
- static CURSOR : Cell <usize > = Cell :: new( 0 ) ;
12
+ static CURSOR : Cell <usize > = const { Cell :: new( 0 ) } ;
13
13
/// Width of the terminal
14
- static WIDTH : Cell <usize > = Cell :: new( DEFAULT_COLUMN_WIDTH ) ;
14
+ static WIDTH : Cell <usize > = const { Cell :: new( DEFAULT_COLUMN_WIDTH ) } ;
15
15
}
16
16
17
17
/// Print to terminal output to a buffer
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ impl<'a> scoped_cell::ApplyL<'a> for BridgeStateL {
209
209
210
210
thread_local ! {
211
211
static BRIDGE_STATE : scoped_cell:: ScopedCell <BridgeStateL > =
212
- scoped_cell:: ScopedCell :: new( BridgeState :: NotConnected ) ;
212
+ const { scoped_cell:: ScopedCell :: new( BridgeState :: NotConnected ) } ;
213
213
}
214
214
215
215
impl BridgeState < ' _ > {
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ thread_local! {
223
223
/// This is required as the thread-local state in the proc_macro client does
224
224
/// not handle being re-entered, and will invalidate all `Symbol`s when
225
225
/// entering a nested macro.
226
- static ALREADY_RUNNING_SAME_THREAD : Cell <bool > = Cell :: new( false ) ;
226
+ static ALREADY_RUNNING_SAME_THREAD : Cell <bool > = const { Cell :: new( false ) } ;
227
227
}
228
228
229
229
/// Keep `ALREADY_RUNNING_SAME_THREAD` (see also its documentation)
You can’t perform that action at this time.
0 commit comments