diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-12 16:24:31 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-12 16:25:39 +0100 |
| commit | d0873c7a11e71a46ad58c1d152fb0599281d98df (patch) | |
| tree | 58de90de657d19c50055b7a762bc7208e4b6c29e /compiler/rustc_errors/src | |
| parent | ed195328689e052b5270b25d0e410b491914fc71 (diff) | |
| download | rust-d0873c7a11e71a46ad58c1d152fb0599281d98df.tar.gz rust-d0873c7a11e71a46ad58c1d152fb0599281d98df.zip | |
constify a couple thread_local statics
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/markdown/term.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/markdown/term.rs b/compiler/rustc_errors/src/markdown/term.rs index 88c3c8b9ff2..06c1333d93d 100644 --- a/compiler/rustc_errors/src/markdown/term.rs +++ b/compiler/rustc_errors/src/markdown/term.rs @@ -9,9 +9,9 @@ const DEFAULT_COLUMN_WIDTH: usize = 140; thread_local! { /// Track the position of viewable characters in our buffer - static CURSOR: Cell<usize> = Cell::new(0); + static CURSOR: Cell<usize> = const { Cell::new(0) }; /// Width of the terminal - static WIDTH: Cell<usize> = Cell::new(DEFAULT_COLUMN_WIDTH); + static WIDTH: Cell<usize> = const { Cell::new(DEFAULT_COLUMN_WIDTH) }; } /// Print to terminal output to a buffer |
