make Arguments::as_statically_known_str doc(hidden)

(cherry picked from commit cfcc47ea54)
This commit is contained in:
mejrs 2025-04-04 21:43:03 +02:00 committed by Josh Stone
parent 10e682e67a
commit d1cd5ee9f6

View file

@ -743,6 +743,7 @@ impl<'a> Arguments<'a> {
#[unstable(feature = "fmt_internals", reason = "internal to standard library", issue = "none")]
#[must_use]
#[inline]
#[doc(hidden)]
pub fn as_statically_known_str(&self) -> Option<&'static str> {
let s = self.as_str();
if core::intrinsics::is_val_statically_known(s.is_some()) { s } else { None }