We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee9c7c9 + cd7c161 commit 0238d26Copy full SHA for 0238d26
library/core/src/macros/mod.rs
@@ -969,6 +969,14 @@ pub(crate) mod builtin {
969
/// let s = fmt::format(format_args!("hello {}", "world"));
970
/// assert_eq!(s, format!("hello {}", "world"));
971
/// ```
972
+ ///
973
+ /// # Lifetime limitation
974
975
+ /// Except when no formatting arguments are used,
976
+ /// the produced `fmt::Arguments` value borrows temporary values,
977
+ /// which means it can only be used within the same expression
978
+ /// and cannot be stored for later use.
979
+ /// This is a known limitation, see [#92698](https://github.com/rust-lang/rust/issues/92698).
980
#[stable(feature = "rust1", since = "1.0.0")]
981
#[cfg_attr(not(test), rustc_diagnostic_item = "format_args_macro")]
982
#[allow_internal_unsafe]
0 commit comments