Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for RFC 1682: field init shorthand #37340
Comments
aturon
added
B-RFC-approved
B-unstable
A-lang
labels
Oct 22, 2016
eddyb
referenced this issue
Oct 22, 2016
Merged
Implement field shorthands in struct literal expressions. #11994
This comment has been minimized.
This comment has been minimized.
|
Once we have this syntax, we'll want to clean up the compiler where it's useful. Since this would be almost a rote cleanup, we'd either want a mentored issue or a tool to do it. |
This comment has been minimized.
This comment has been minimized.
I wonder if @killercup 's |
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik |
This comment has been minimized.
This comment has been minimized.
|
Yeah, Rustfmt could def. do this. |
This comment has been minimized.
This comment has been minimized.
|
I haven't read that RFC; if you can write a lint that suggests the new Eduard-Mihai Burtescu notifications@github.com schrieb am Sa. 22. Okt.
|
This comment has been minimized.
This comment has been minimized.
|
I think that the compiler shouldn't lint for this, suggesting sugar features is more a thing for clippy. |
bors
added a commit
that referenced
this issue
Oct 27, 2016
This comment has been minimized.
This comment has been minimized.
|
What's the current status on this—in nightly, it looks like, via #11994? Do we know when it's expected to land? |
This comment has been minimized.
This comment has been minimized.
|
@chriskrycho Confirmed—it works in nightly. I'm using the feature in my nightly project right now. |
This comment has been minimized.
This comment has been minimized.
|
The new documentation required RFC means we need to figure out how to document it, I think?
We also need changelog entries? I propose the following for the short entry. I don't have the energy right now to try a long entry.
|
This comment has been minimized.
This comment has been minimized.
|
Rustfmt also needs support for this feature. The tracking issue is here. I'm planning to tackle that eventually but I'm not going to lick the cookie just yet. |
This comment has been minimized.
This comment has been minimized.
|
I opened #38830 to specifically track adding docs. |
This comment has been minimized.
This comment has been minimized.
|
Can we nominate this for FCP now in expectation that it will be finished in time to branch 1.16 on Feb 2? |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
added
the
T-lang
label
Jan 11, 2017
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jan 11, 2017
•
|
Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This comment has been minimized.
This comment has been minimized.
|
Reluctantly, and assuming documentation is finished before we stabilise. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rfcbot concern documentation-unfinished (Despite the point just made by @withoutboats, I see no reason to put my check mark on something whose required documentation is unfinished.) |
This comment has been minimized.
This comment has been minimized.
There has been some discussion about this question in the thread to stabilize custom derive. quoting @steveklabnik :
In my opinion, it would make sense to separate the two decisions as it allows for a cleaner transition. E.g. you can't merge a docs PR if you don't know whether something will be stabilized (docs are intended for the users, no? They should, in the best case, always match what is actually stable), but if there is no FCP, how do you know whether it will actually be stabilized. |
This comment has been minimized.
This comment has been minimized.
|
@est31 I entirely agree. The review here is purely to go into FCP, which still leaves several weeks before stabilization could even occur; the check for documentation should happen separately, later. That will give us the highest throughput. |
This comment has been minimized.
This comment has been minimized.
|
I can see the throughput argument. But I am having difficulty making this argument jibe in my head with the fact that RFC's now have a section on "how this will be taught to new users" ... so I thought we were transitioning to a world where docs were required earlier on before we make final decisions on them. Anyway, fine, I don't actually care enough to hold up the process. |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot resolved documentation-unfinished |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot reviewed |
This comment has been minimized.
This comment has been minimized.
|
Manually marking for FCP. |
aturon
added
the
final-comment-period
label
Jan 13, 2017
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jan 23, 2017
|
psst @nikomatsakis, I wasn't able to add the |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Feb 2, 2017
|
The final comment period is now complete. |
This comment has been minimized.
This comment has been minimized.
|
Now that #39459 has landed, I think there's nothing blocking stabilization at this point. |
This comment has been minimized.
This comment has been minimized.
est31
added a commit
to est31/rust
that referenced
this issue
Feb 12, 2017
This comment has been minimized.
This comment has been minimized.
|
Hmm... seems @lfairy is right: the documentation RFC doesn't require that the feature is documented in Rust by example. So all the points required for stabilisation are done (see the list in #38830), which means we can stabilize it! |
est31
added a commit
to est31/rust
that referenced
this issue
Feb 15, 2017
This comment has been minimized.
This comment has been minimized.
|
We're ready to go forward with stabilization! |
This comment has been minimized.
This comment has been minimized.
|
Easy enough to add an example anyway. I needed a little win today! |
aturon commentedOct 22, 2016
•
edited
RFC.
Before stabilizing: