File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -969,6 +969,14 @@ pub(crate) mod builtin {
969
969
/// let s = fmt::format(format_args!("hello {}", "world"));
970
970
/// assert_eq!(s, format!("hello {}", "world"));
971
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).
972
980
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
973
981
#[ cfg_attr( not( test) , rustc_diagnostic_item = "format_args_macro" ) ]
974
982
#[ allow_internal_unsafe]
You can’t perform that action at this time.
0 commit comments