[rust-dev] RFC: Ignore trailing semicolons

Patrick Walton pwalton at mozilla.com
Thu Aug 2 10:47:36 PDT 2012


On 8/2/12 9:59 AM, Niko Matsakis wrote:
> My "official position" is unopposed.  I personally like the rule about
> omitting the trailing semicolon, it makes it syntactically clearer when
> a value is being returned, but I understand some people have also
> complained about it.  Your change seems to be a relatively simple way to
> make the presence or absence of a trailing semicolon irrelevant.
>
> One thing I am wondering about.  The other unpopular semicolon rule (for
> which I am responsible) is the rule that a semicolon is required for a
> `do` or `for` with a non-unit result.  This rule never bits me but I
> understand it occasionally bites users of the task API.  Did you undo
> this rule?  (And, if so, do we plan to replace with a
> whitespace-sensitive warning?)

I left it alone. I like the idea of a whitespace-sensitive warning, but 
I don't feel particularly strongly.

Patrick


More information about the Rust-dev mailing list