From ebde571aa839f73b9119113de6bc2e383b5f9449 Mon Sep 17 00:00:00 2001 From: Warren Parad <5056218+wparad@users.noreply.github.com> Date: Mon, 1 May 2023 12:41:08 +0200 Subject: [PATCH] Improve transparency of 5_i32 versus 5i32 --- src/scope/borrow.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scope/borrow.md b/src/scope/borrow.md index 72c70e736a..018f00c35c 100644 --- a/src/scope/borrow.md +++ b/src/scope/borrow.md @@ -20,7 +20,9 @@ fn borrow_i32(borrowed_i32: &i32) { } fn main() { - // Create a boxed i32, and a stacked i32 + // Create a boxed i32 in the heap, and a i32 on the stack + // Remember: numbers can have arbitrary underscores added for readability + // 5_i32 is the same as 5i32 let boxed_i32 = Box::new(5_i32); let stacked_i32 = 6_i32;