summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-04-28 14:27:57 +0100
committerRalf Jung <post@ralfj.de>2023-08-28 11:54:40 +0200
commit39c642e3d2c5f5d5e6e6b65ccd01439ef736c277 (patch)
treef897921eb2e44d64a1acac3e42dbc59ba8a05345 /library/alloc/src
parent2ec8b6b50fddf481f3ed11201a142f09481a81c6 (diff)
downloadrust-39c642e3d2c5f5d5e6e6b65ccd01439ef736c277.tar.gz
rust-39c642e3d2c5f5d5e6e6b65ccd01439ef736c277.zip
format, format_args: Make xref to std::fmt much more prominent
That xref contains the actual documentation for what format! does.
It should be very prominent - particularly, more so than the other
links.
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/macros.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs
index 4c6ae8f2579..3f19561e1ac 100644
--- a/library/alloc/src/macros.rs
+++ b/library/alloc/src/macros.rs
@@ -79,10 +79,12 @@ macro_rules! vec {
 ///
 /// The first argument `format!` receives is a format string. This must be a string
 /// literal. The power of the formatting string is in the `{}`s contained.
-///
 /// Additional parameters passed to `format!` replace the `{}`s within the
 /// formatting string in the order given unless named or positional parameters
-/// are used; see [`std::fmt`] for more information.
+/// are used.
+///
+/// See [the formatting syntax documentation in `std::fmt`](../std/fmt/index.html)
+/// for details.
 ///
 /// A common use for `format!` is concatenation and interpolation of strings.
 /// The same convention is used with [`print!`] and [`write!`] macros,
@@ -91,7 +93,6 @@ macro_rules! vec {
 /// To convert a single value to a string, use the [`to_string`] method. This
 /// will use the [`Display`] formatting trait.
 ///
-/// [`std::fmt`]: ../std/fmt/index.html
 /// [`print!`]: ../std/macro.print.html
 /// [`write!`]: core::write
 /// [`to_string`]: crate::string::ToString