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#1685: Deprecate anonymous parameters #41686
Comments
aturon
added
B-RFC-approved
T-lang
labels
May 1, 2017
This comment has been minimized.
This comment has been minimized.
|
I could work on this. From reading the RFC discussion, I think the "soft" deprecation strategy has been chosen? So on the compiler side, we'll need an allow by default (deprecation) lint for anonymous parameters, right? |
This comment has been minimized.
This comment has been minimized.
|
@est31 Awesome! And yes, that's correct. This will be most effective if we add the lint to Clippy as well. (The open question is around the criteria for moving to a warn-by-default strategy in the future.) |
est31
added a commit
to est31/rust
that referenced
this issue
May 2, 2017
This comment has been minimized.
This comment has been minimized.
|
About the clippy lint, I'll leave that to someone else. Given #41692, it should be mostly copy paste, but maybe with official rust claiming the lint name one has to chose another one. No idea. |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
May 2, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
May 2, 2017
This comment has been minimized.
This comment has been minimized.
|
IJR inspection: intellij-rust/intellij-rust#1211 I'll try to add an automatic fix to |
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 27, 2017
petrochenkov
referenced this issue
Nov 5, 2017
Merged
Accept interpolated patterns in trait method parameters #45775
bors
added a commit
that referenced
this issue
Nov 11, 2017
bors
added a commit
that referenced
this issue
Nov 11, 2017
mjadczak
referenced this issue
Feb 17, 2018
Closed
[API Design] [II] Get rid of unnamed parameters in traits #1829
This comment has been minimized.
This comment has been minimized.
|
It doesn't appear that this is linting: https://play.rust-lang.org/?gist=b818c6024acb95add60b339e7708d132&version=nightly Also, we might want to try to finish this for the 2018 epoch, so we should start linting now |
This comment has been minimized.
This comment has been minimized.
|
Oh, duh 🤦 It's an allow by default lint. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Should this also apply to |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin I would say no, because the situation for function pointers is just the opposite: nontrivial patterns are forbidden:
|
This comment has been minimized.
This comment has been minimized.
|
Also, I think the original RFC doesn't mention fn pointers... |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin |
petrochenkov
referenced this issue
May 9, 2018
Open
Slice patterns cannot be used in trait methods #50571
This comment has been minimized.
This comment has been minimized.
|
Shall it be addressed before Rust 2018? Maybe there should be a Github label like "rust-2018-checklist"? Or it should be a Github milestone? |
This comment has been minimized.
This comment has been minimized.
|
Do the current plan is to make this warn by default starting at the edition and deprecate it in a later edition. (See #48309) |
bors
added a commit
that referenced
this issue
May 27, 2018
varkor
referenced this issue
Aug 3, 2018
Open
Allow destructuring parameters in trait function declarations #53046
This comment has been minimized.
This comment has been minimized.
|
In RFC 2522, I argue that to support the cases in that RFC we should expedite the schedule of RFC 1685 |
rfcbot
removed
the
proposed-final-comment-period
label
Aug 21, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Aug 21, 2018
|
|
mark-i-m
referenced this issue
Aug 22, 2018
Merged
Remove anonymous trait params from 2018 and beyond #53612
bors
added a commit
that referenced
this issue
Aug 25, 2018
bors
added a commit
that referenced
this issue
Aug 25, 2018
bors
added a commit
that referenced
this issue
Aug 28, 2018
rfcbot
added
finished-final-comment-period
and removed
final-comment-period
labels
Aug 31, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Aug 31, 2018
|
The final comment period, with a disposition to merge, as per the review above, is now complete. |
This comment has been minimized.
This comment has been minimized.
|
The OP mentions some adjusting of documentation. Does anyone know specifically which documentation needs to be adjusted? |
This comment has been minimized.
This comment has been minimized.
|
@mark-i-m The forge has a section on updating documentation, but I don't think there's much to do here for deprecations other than to make sure that the book / reference / RBE aren't using the feature. |
This comment has been minimized.
This comment has been minimized.
|
@cramertj @mark-i-m We should probably note this in the edition guide as well. |
Centril
referenced this issue
Sep 15, 2018
Closed
Note anon params as hard error in 2018 in guide #103
This comment has been minimized.
This comment has been minimized.
|
Triage: We still need to update the documentation. |
This was referenced Sep 17, 2018
This comment has been minimized.
This comment has been minimized.
|
Sorry for the delay. I have been a bit swamped lately and mostly keeping up from my phone, so not much opportunity to write PRs Reference: rust-lang-nursery/reference#420 I did a brief search through the nomicon, book, RBE sections on traits and didn't see any other anon params, but please let me know if I missed one. |
This comment has been minimized.
This comment has been minimized.
|
Docs have all been merged. This is good to go. |
This comment has been minimized.
This comment has been minimized.
|
Before we close the tracking issue; we still need to update the reference with notes about the actual edition-breaking change. |
This comment has been minimized.
This comment has been minimized.
|
@Centril @steveklabnik I opened rust-lang-nursery/reference#421 Does this look like what you were thinking of? |
This comment has been minimized.
This comment has been minimized.
|
@mark-i-m I was thinking of specifying somewhat more formally (BNF, etc.) but this is good in the interim :) |
This comment has been minimized.
This comment has been minimized.
|
@Centril I didn't realize there was a BNF spec of rust anywhere. Could you point me to it so I can update it? |
This comment has been minimized.
This comment has been minimized.
|
@mark-i-m I don't think there is a BNF spec of Rust anywhere that covers all of Rust and is up to date; However, we do specify some parts of the language in BNF; for example: https://doc.rust-lang.org/reference/expressions/literal-expr.html. I think the most up-to-date specification is in parser-lalr.y but it isn't fully updated either. We don't need to spec it in BNF right now; but as a long term goal it would be good to do so. |
This comment has been minimized.
This comment has been minimized.
|
@Centril Perhaps we can spin that off into its own specific issue? Currently, I think the last piece of documentation that is mandatory for this issue would be rust-lang-nursery/reference#421. Right? |
This comment has been minimized.
This comment has been minimized.
|
@mark-i-m nah; no issue needed; we should define a canonical grammar for Rust at some point, hopefully soon. Once the reference PR lands we can close this issue. |
This comment has been minimized.
This comment has been minimized.
|
The reference PR has been merged, so I am closing this. |
aturon commentedMay 1, 2017
•
edited by Centril
This is a tracking issue for the RFC "Deprecate anonymous parameters " (rust-lang/rfcs#1685).
Steps:
Unresolved questions: