about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-27 21:11:52 +0000
committerbors <bors@rust-lang.org>2023-10-27 21:11:52 +0000
commit2f1bd0729b74787f55d4cbc7818cfd787cd43a99 (patch)
tree532937d9ad800363c5dce83071e1066f2964428a /library/std/src
parent59bb9505bc0d0c9fbf9b5daf052bf033b63e5cc0 (diff)
parentb9015dab9dc27e83532f08b1ddb683b37eeeac45 (diff)
downloadrust-2f1bd0729b74787f55d4cbc7818cfd787cd43a99.tar.gz
rust-2f1bd0729b74787f55d4cbc7818cfd787cd43a99.zip
Auto merge of #117294 - matthiaskrgr:rollup-xylsec7, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #116834 (Remove `rustc_symbol_mangling/messages.ftl`.)
 - #117212 (Properly restore snapshot when failing to recover parsing ternary)
 - #117246 (Fix ICE: Restrict param constraint suggestion)
 - #117247 (NVPTX: Allow PassMode::Direct for ptx kernels for now)
 - #117270 (Hide internal methods from documentation)
 - #117281 (std::thread : add SAFETY comment)
 - #117287 (fix miri target information for Test step)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs1
-rw-r--r--library/std/src/thread/mod.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index bca5d859b66..aa9a2482d2d 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -317,6 +317,7 @@ pub use self::stdio::set_output_capture;
 #[stable(feature = "is_terminal", since = "1.70.0")]
 pub use self::stdio::IsTerminal;
 #[unstable(feature = "print_internals", issue = "none")]
+#[doc(hidden)]
 pub use self::stdio::{_eprint, _print};
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use self::{
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 68ea486933a..4097eb5549e 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -546,6 +546,8 @@ impl Builder {
         }
 
         let main = Box::new(main);
+        // SAFETY: dynamic size and alignment of the Box remain the same. See below for why the
+        // lifetime change is justified.
         #[cfg(bootstrap)]
         let main =
             unsafe { mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };