Valid Rust: `if true { 0 } else { 1 }`. Invalid Rust: `if true { 0 } else { 1 } | 2`. Valid Rust: `let a = if true { 0 } else { 1 } | 2` 
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Why is the latter invalid?
-
Because closing curly braces can also be statement terminators in lieu of semicolons. You'd have ambiguity with `if a {} else {} & 1
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.