about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-26 10:12:14 +0000
committerbors <bors@rust-lang.org>2025-07-26 10:12:14 +0000
commit8708f3cd1f96d226f6420a58ebdd61aa0bc08b0a (patch)
tree865b4c9c9a70184f93a3e15b750b90c446077700 /compiler/rustc_errors/src
parent051d0e8a957c98f87ddaf6295c3a3ecd88742ff9 (diff)
parent39141d01f15b4b16566816058bdfab22831cc4e5 (diff)
downloadrust-8708f3cd1f96d226f6420a58ebdd61aa0bc08b0a.tar.gz
rust-8708f3cd1f96d226f6420a58ebdd61aa0bc08b0a.zip
Auto merge of #144490 - tgross35:rollup-ps0utme, r=tgross35
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#140871 (Don't lint against named labels in `naked_asm!`)
 - rust-lang/rust#141663 (rustdoc: add ways of collapsing all impl blocks)
 - rust-lang/rust#143272 (Upgrade the `fortanix-sgx-abi` dependency)
 - rust-lang/rust#143585 (`loop_match`: suggest extracting to a `const` item)
 - rust-lang/rust#143698 (Fix unused_parens false positive)
 - rust-lang/rust#143859 (Guarantee 8 bytes of alignment in Thread::into_raw)
 - rust-lang/rust#144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - rust-lang/rust#144412 (Small cleanup: Use LocalKey<Cell> methods more)
 - rust-lang/rust#144431 (Disable has_reliable_f128_math on musl targets)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/markdown/term.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_errors/src/markdown/term.rs b/compiler/rustc_errors/src/markdown/term.rs
index 579e00b8b85..fe1d80bdbe8 100644
--- a/compiler/rustc_errors/src/markdown/term.rs
+++ b/compiler/rustc_errors/src/markdown/term.rs
@@ -18,7 +18,7 @@ thread_local! {
 pub(crate) fn entrypoint(stream: &MdStream<'_>, buf: &mut Buffer) -> io::Result<()> {
     #[cfg(not(test))]
     if let Some((w, _)) = termize::dimensions() {
-        WIDTH.with(|c| c.set(std::cmp::min(w, DEFAULT_COLUMN_WIDTH)));
+        WIDTH.set(std::cmp::min(w, DEFAULT_COLUMN_WIDTH));
     }
     write_stream(stream, buf, None, 0)?;
     buf.write_all(b"\n")
@@ -84,7 +84,7 @@ fn write_tt(tt: &MdTree<'_>, buf: &mut Buffer, indent: usize) -> io::Result<()>
             reset_cursor();
         }
         MdTree::HorizontalRule => {
-            (0..WIDTH.with(Cell::get)).for_each(|_| buf.write_all(b"-").unwrap());
+            (0..WIDTH.get()).for_each(|_| buf.write_all(b"-").unwrap());
             reset_cursor();
         }
         MdTree::Heading(n, stream) => {
@@ -121,7 +121,7 @@ fn write_tt(tt: &MdTree<'_>, buf: &mut Buffer, indent: usize) -> io::Result<()>
 
 /// End of that block, just wrap the line
 fn reset_cursor() {
-    CURSOR.with(|cur| cur.set(0));
+    CURSOR.set(0);
 }
 
 /// Change to be generic on Write for testing. If we have a link URL, we don't
@@ -144,7 +144,7 @@ fn write_wrapping<B: io::Write>(
                 buf.write_all(ind_ws)?;
                 cur.set(indent);
             }
-            let ch_count = WIDTH.with(Cell::get) - cur.get();
+            let ch_count = WIDTH.get() - cur.get();
             let mut iter = to_write.char_indices();
             let Some((end_idx, _ch)) = iter.nth(ch_count) else {
                 // Write entire line