Get the latest tech news
Weird Expressions in Rust
Explore weird quirks of rusts type system
Note that these are not bugs, but rather extreme cases of rust features like loops, expressions, coercion and so on. In the first line we immediately exit the loop, because break is a valid expression, which has the type!, we can use it in an if statement. Then we immediately call that closure, passing in a tuple with a string and a char, and an empty block.
Or read this on Hacker News