diff options
| author | bors <bors@rust-lang.org> | 2025-02-18 18:04:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-18 18:04:32 +0000 |
| commit | 827a0d638dabc9a22c56f9c37a557568f86ac76c (patch) | |
| tree | d67fdcd4af7e845b5b109fcdaeea7a8b19e0df38 /library/std/src | |
| parent | 3b022d8ceea570db9730be34d964f0cc663a567f (diff) | |
| parent | 3ebe11b2e8fdba543127f63c74982ab604c6034b (diff) | |
| download | rust-827a0d638dabc9a22c56f9c37a557568f86ac76c.tar.gz rust-827a0d638dabc9a22c56f9c37a557568f86ac76c.zip | |
Auto merge of #137231 - Urgau:rollup-heiq934, r=Urgau
Rollup of 9 pull requests Successful merges: - #136750 (Make ub_check message clear that it's not an assert) - #137151 (Install more signal stack trace handlers) - #137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg) - #137195 (cg_clif: use exclusively ABI alignment) - #137202 (Enforce T: Hash for Interned<...>) - #137205 (Remove `std::os::wasi::fs::FileExt::tell`) - #137211 (don't ICE for alias-relate goals with error term) - #137214 (add last std diagnostic items for clippy) - #137221 (Remove scrutinee_hir_id from ExprKind::Match) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/f16.rs | 2 | ||||
| -rw-r--r-- | library/std/src/io/stdio.rs | 1 | ||||
| -rw-r--r-- | library/std/src/os/wasi/fs.rs | 11 | ||||
| -rw-r--r-- | library/std/src/panic.rs | 1 | ||||
| -rw-r--r-- | library/std/src/process.rs | 4 |
5 files changed, 8 insertions, 11 deletions
diff --git a/library/std/src/f16.rs b/library/std/src/f16.rs index bdbe3e21994..0af69dff05a 100644 --- a/library/std/src/f16.rs +++ b/library/std/src/f16.rs @@ -1321,12 +1321,14 @@ impl f16 { /// ``` /// #![feature(f16)] /// #![feature(float_erf)] + /// # #[cfg(reliable_f16_math)] { /// let x: f16 = 0.123; /// /// let one = x.erf() + x.erfc(); /// let abs_difference = (one - 1.0).abs(); /// /// assert!(abs_difference <= f16::EPSILON); + /// # } /// ``` #[rustc_allow_incoherent_impl] #[must_use = "method returns a new number and does not mutate the original value"] diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 318c3508221..661c422811a 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -239,6 +239,7 @@ fn handle_ebadf_lazy<T>(r: io::Result<T>, default: impl FnOnce() -> T) -> io::Re /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "Stdin")] pub struct Stdin { inner: &'static Mutex<BufReader<StdinRaw>>, } diff --git a/library/std/src/os/wasi/fs.rs b/library/std/src/os/wasi/fs.rs index 42aada131da..34f0e89f2f1 100644 --- a/library/std/src/os/wasi/fs.rs +++ b/library/std/src/os/wasi/fs.rs @@ -162,13 +162,6 @@ pub trait FileExt { Ok(()) } - /// Returns the current position within the file. - /// - /// This corresponds to the `fd_tell` syscall and is similar to - /// `seek` where you offset 0 bytes from the current position. - #[doc(alias = "fd_tell")] - fn tell(&self) -> io::Result<u64>; - /// Adjusts the flags associated with this file. /// /// This corresponds to the `fd_fdstat_set_flags` syscall. @@ -240,10 +233,6 @@ impl FileExt for fs::File { self.as_inner().as_inner().pwrite(bufs, offset) } - fn tell(&self) -> io::Result<u64> { - self.as_inner().as_inner().tell() - } - fn fdstat_set_flags(&self, flags: u16) -> io::Result<()> { self.as_inner().as_inner().set_flags(flags) } diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 61801db072a..22776ae2bc4 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -255,6 +255,7 @@ pub use crate::panicking::{set_hook, take_hook}; #[stable(feature = "panic_any", since = "1.51.0")] #[inline] #[track_caller] +#[cfg_attr(not(test), rustc_diagnostic_item = "panic_any")] pub fn panic_any<M: 'static + Any + Send>(msg: M) -> ! { crate::panicking::begin_panic(msg); } diff --git a/library/std/src/process.rs b/library/std/src/process.rs index fd0fd1cb755..bdd4844b651 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -217,6 +217,7 @@ use crate::{fmt, fs, str}; /// /// [`wait`]: Child::wait #[stable(feature = "process", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "Child")] pub struct Child { pub(crate) handle: imp::Process, @@ -2115,6 +2116,7 @@ impl Child { /// [`ErrorKind`]: io::ErrorKind /// [`InvalidInput`]: io::ErrorKind::InvalidInput #[stable(feature = "process", since = "1.0.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "child_kill")] pub fn kill(&mut self) -> io::Result<()> { self.handle.kill() } @@ -2135,6 +2137,7 @@ impl Child { /// ``` #[must_use] #[stable(feature = "process_id", since = "1.3.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "child_id")] pub fn id(&self) -> u32 { self.handle.id() } @@ -2375,6 +2378,7 @@ pub fn exit(code: i32) -> ! { /// [panic hook]: crate::panic::set_hook #[stable(feature = "process_abort", since = "1.17.0")] #[cold] +#[cfg_attr(not(test), rustc_diagnostic_item = "process_abort")] pub fn abort() -> ! { crate::sys::abort_internal(); } |
