Commit bce59ab
authored
Rollup merge of rust-lang#145943 - dianne:format-args-assign-docs, r=joboet
stdlib docs: document lifetime extension for `format_args!`'s arguments
Since rust-lang#140748 is stable and rust-lang#92698 is closed, the section about `format_args!`'s argument lifetime limitation is outdated. I've updated it to point to the Reference docs, which will specify lifetime extension rules for builtin macros once rust-lang/reference#1980 or equivalent is merged.
I've also taken the liberty of updating one of the doctests to assign the result of `format_args!` to a variable, both to provide an example and because I think it reads a little better.
r? `@m-ou-se`1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
954 | | - | |
955 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
| |||
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
979 | | - | |
| 980 | + | |
980 | 981 | | |
981 | 982 | | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
986 | 991 | | |
987 | 992 | | |
988 | 993 | | |
| |||
0 commit comments