Uh oh!
There was an error while loading. Please reload this page.
Disallow trailing parentheses for nullary enum variants - #12935
Conversation
There was a problem hiding this comment.
Instead of using error-pattern, you should be using //~ ERROR nullary enum variants ...
This will check that the line numbers are correct, not just that the error was printed.
lbonn
commented
Mar 16, 2014
Thanks for the tip, here is a new diff. |
There was a problem hiding this comment.
These tests would either be written as
enumFoo{Bar(),Baz()}//~ ERROR nullary enum variants//~^ ERROR nullary enum variantsor, preferably (to keep the error as precise as possible)
enumFoo{Bar(),//~ ERROR nullary enum variantsBaz()//~ ERROR nullary enum variants}and similarly below.
lbonn
commented
Mar 17, 2014
Sorry for the mix-up, here is another update. |
There was a problem hiding this comment.
I don't know what other folks think about this but I prefer having the full error message here. There are error messages that share the same prefix (not the case of this PR... I think). Also, the full error message helps understanding what the test is actually testing.
lbonn
commented
Mar 17, 2014
Ok, I pushed more documented test cases. |
related issues of mozilla/rust: - rust-lang/rust#12772 rename std::vec -> std::slice - rust-lang/rust#13028 rename std::vec_ng -> std::vec - rust-lang/rust@0305ed5 std: Add Vec to the prelude - rust-lang/rust#12935 Disallow trailing parentheses for nullary enum variants
…r=Veykril Parse range patterns in struct and slice without trailing comma Resolvesrust-lang#12935 This patch includes the support for range patterns in slices, which is unstable (tracked in rust-lang#67264). If it's not desired I can remove it.
Fix for #12560