From acca4b8f86b1cf7b41236225247b884f6a52d708 Mon Sep 17 00:00:00 2001 From: Isaac Cloos Date: Sun, 21 Aug 2022 15:28:27 -0400 Subject: Extra documentation for new formatting feature High traffic macros should detail this helpful addition. --- library/alloc/src/macros.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'library/alloc') diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs index 88eb6aa7a83..5198bf297d9 100644 --- a/library/alloc/src/macros.rs +++ b/library/alloc/src/macros.rs @@ -107,6 +107,8 @@ macro_rules! vec { /// format!("test"); /// format!("hello {}", "world!"); /// format!("x = {}, y = {y}", 10, y = 30); +/// let (x, y) = (1, 2); +/// format!("{x} + {y} = 3"); /// ``` #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] -- cgit 1.4.1-3-g733a5