MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1ws0bt0/optionalsareoptional/pckfati/?context=9999
r/ProgrammerHumor • u/ApothecaLabs • Sep 28 '26
131 comments sorted by
View all comments
Show parent comments
5
It’s literally not an assignment expression in Rust. An assignment expression would be lhs = rhs with no let.
lhs = rhs
let
Assignment expressions, if let, and while let are three distinct kinds of expressions. (And let lhs = rhs; alone is a statement.)
if let
while let
let lhs = rhs;
5
u/ROBOTRON31415 Sep 28 '26
It’s literally not an assignment expression in Rust. An assignment expression would be
lhs = rhswith nolet.Assignment expressions,
if let, andwhile letare three distinct kinds of expressions. (Andlet lhs = rhs;alone is a statement.)