We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d795a6 commit cd7c161Copy full SHA for cd7c161
library/core/src/macros/mod.rs
@@ -868,6 +868,14 @@ pub(crate) mod builtin {
868
/// let s = fmt::format(format_args!("hello {}", "world"));
869
/// assert_eq!(s, format!("hello {}", "world"));
870
/// ```
871
+ ///
872
+ /// # Lifetime limitation
873
874
+ /// Except when no formatting arguments are used,
875
+ /// the produced `fmt::Arguments` value borrows temporary values,
876
+ /// which means it can only be used within the same expression
877
+ /// and cannot be stored for later use.
878
+ /// This is a known limitation, see [#92698](https://github.com/rust-lang/rust/issues/92698).
879
#[stable(feature = "rust1", since = "1.0.0")]
880
#[cfg_attr(not(test), rustc_diagnostic_item = "format_args_macro")]
881
#[allow_internal_unsafe]
0 commit comments