We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50779f commit 377594dCopy full SHA for 377594d
library/core/src/fmt/mod.rs
@@ -444,6 +444,7 @@ impl<'a> Arguments<'a> {
444
#[inline]
445
const fn as_const_str(&self) -> Option<&'static str> {
446
let s = self.as_str();
447
+ // SAFETY: both cases are valid as the result
448
if unsafe { core::intrinsics::is_val_statically_known(s.is_some()) } { s } else { None }
449
}
450
0 commit comments