Update Examples

Glen Whitney 2024-08-25 02:56:07 +00:00
parent bdfa3c25c9
commit 1ef810f375

@ -630,12 +630,12 @@ fn main
//! (1) Since there is only a single expression //! (1) Since there is only a single expression
//! following the `let z=`, without the `scope` //! following the `let z=`, without the `scope`
//! keyword this would merely be `let z = 2 * x` //! keyword this would merely be `let z = 2 * x`
//! (2) The final semicolon is allowed and preserved //! (2) The final semicolon is allowed and preserved
//! by Husht to suppress the return value from //! by Husht to suppress the return value from
//! the scope, but returning the last expression //! the scope, but returning the last expression
//! from a scope is the default for Husht //! from a scope is the default for Husht
let z = scope let z = scope
// Final semicolon discards value; `z` ← `() // Final semicolon discards value; `z``()`
2 * x; 2 * x;
println! "x is {:?}", x println! "x is {:?}", x