You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reference also doesn't say it shouldn't. This is expected behaviour as it allows this to be valid Rust code:
let x = match foo {1 => do_1(),2 => do_2(),
_ => return0}
Since a semicolon here wouldn't be valid syntax. Note that the semicolon isn't part of the return expression at all, it is instead part of statement syntax.
Referencing your comment in the linked issue, there are many constructs that you're unlikely to see in regular Rust code that are, nonetheless, valid. Take a look at this test for some crazy stuff that is perfectly valid Rust code.
My "investigation": #17257 (comment)
Test case:
This compiles, but the reference doesn't mention, that is should.
The text was updated successfully, but these errors were encountered: