-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libsyntax: Disallow struct literals after if
, while
, match
, and
#14885
Conversation
Should this update the manual as well? |
Updated the manual. r? @nick29581 |
@@ -1 +1 @@ | |||
Subproject commit 7b97b8468f0614072cf3299fa8c51e85f609316f | |||
Subproject commit ed112ca1e4275e1c5707a898f2bf6164707ba378 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was reverted by accident I think
re-r? @alexcrichton |
`for...in`. Closes rust-lang#14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change]
…xcrichton `for...in`. Closes #14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change] r? @nick29581
@@ -12,7 +12,7 @@ struct Foo; | |||
|
|||
fn g3() { | |||
let _mid_tuple = (Foo { }, 2); | |||
//~^ ERROR: unit-like struct construction is written with no trailing `{ }` | |||
//~^ ERROR: structure literal must either have at least one field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English - "either ..." or? should perhaps be:
structure literal must have at least one field (removing the 'either')
Same for below changes
use `::core` instead of `$crate` in `option_env!` fix rust-lang#14885
for...in
.Closes #14803.
If you used a structure literal after one of these keywords, surround it
in parentheses.
[breaking-change]
r? @nick29581