r[expr.placeholder]
_ expressions
r[expr.placeholder.syntax]
UnderscoreExpression -> `_`
r[expr.placeholder.intro]
Underscore expressions, denoted with the symbol _, are used to signify a
placeholder in a destructuring assignment.
r[expr.placeholder.lhs-assignment-only] They may only appear in the left-hand side of an assignment.
r[expr.placeholder.pattern] Note that this is distinct from the wildcard pattern.
Examples of _ expressions:
let p = ;
let mut a = 0;
= p;
Position = Position;
// unused result, assignment to `_` used to declare intent and remove a warning
_ = 2 + 2;
// triggers unused_must_use warning
// 2 + 2;
// equivalent technique using a wildcard pattern in a let-binding
let _ = 2 + 2;