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 upWarn on anon params in 2015 edition #53272
Conversation
rust-highfive
assigned
michaelwoerister
Aug 11, 2018
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Aug 11, 2018
This comment has been minimized.
This comment has been minimized.
|
Also, I still need to make sure tests pass... |
rust-highfive
assigned
nikomatsakis
and unassigned
michaelwoerister
Aug 11, 2018
mark-i-m
referenced this pull request
Aug 11, 2018
Closed
Tracking issue for RFC#1685: Deprecate anonymous parameters #41686
This comment has been minimized.
This comment has been minimized.
|
Also, I need to add a migration suggestion that rustfix can use. |
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
kennytm
added
T-lang
relnotes
labels
Aug 11, 2018
mark-i-m
changed the title
[WIP] Warn on anon params in 2015 edition
Warn on anon params in 2015 edition
Aug 12, 2018
Centril
referenced this pull request
Aug 12, 2018
Closed
Anon params will/should be hard error in 2018, explain this #81
nikomatsakis
reviewed
Aug 16, 2018
|
r=me modulo the policy question and the rustfix unit test question |
| "detects anonymous parameters", | ||
| Edition::Edition2018 => Warn | ||
| Warn, | ||
| "detects anonymous parameters" |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Aug 16, 2018
Contributor
So, I think that the policy in general is that we only warn in migration mode -- but this is an unconditional warning, no? I don't really care either way, I just want to Do What's Right.
This comment has been minimized.
This comment has been minimized.
Centril
Aug 17, 2018
Contributor
We talked about this a bit yesterday on Discord; I think our conclusion was that warnings only during migration was the policy but that in this case an unconditional warning would be OK? Did you discuss this further?
This comment has been minimized.
This comment has been minimized.
mark-i-m
Aug 18, 2018
Author
Contributor
I believe if we just wanted to warn in migration mode, we would change this back to Allow and add it to the FutureCompatibilityLints array. I don't really see why it should be different from the other migration lints, but I don't have a strong preference.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Aug 22, 2018
Contributor
I don't see a strong reason to treat this differently from other migration lints either.
Well, wait, I just realized something -- isn't this supposed to be a hard error in the new Edition? I thought that was the whole idea here. =) That is, @Centril wanted to go from "just linting" to giving a "hard error", so as to make space for some other syntax changes we had in mind, so we decided to up the schedule (roughly along the lines of what I think you originally proposed, @mark-i-m)
This comment has been minimized.
This comment has been minimized.
mark-i-m
Aug 22, 2018
Author
Contributor
Yes, but I need to learn how to block the syntax in the new edition, whereas I already know how to change the lint. I was thinking that after this PR, we could submit another that removes the syntax in 2018 edition (I will need some help with that). In the mean time, we can at least start warning as early as possible, right?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Aug 22, 2018
Contributor
Anyway I basically don't care if we warn in 2015 always or only when migrating. I thought the typical policy was only the latter, though. The only reason to do otherwise would be to give a kind of "extra nudge" -- the fact that we accepted a separate RFC (pre-edition) which deprecated this syntax might be enough justification. This would be analogous to deprecating some API, which obviously doesn't have to occur on an edition boundary.
This comment has been minimized.
This comment has been minimized.
mark-i-m
Aug 22, 2018
Author
Contributor
Ok, I opened #53612. This might actually be a lot easier than I expected.
| @@ -125,7 +125,7 @@ trait InTraitDefnReturn { | |||
| // Allowed and disallowed in trait impls | |||
| trait DummyTrait { | |||
| type Out; | |||
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Aug 16, 2018
Contributor
do we have already have a rustfix unit test for this? if not, can we add one?
This comment has been minimized.
This comment has been minimized.
mark-i-m
Aug 18, 2018
Author
Contributor
What do you mean by "this"? This particular file? Or the _: Type suggestion? I had previously added https://github.com/rust-lang/rust/pull/48309/files#diff-cff76de2568555816771ee1e45d8225f in #48309. Is that what you mean?
This comment has been minimized.
This comment has been minimized.
mark-i-m
force-pushed the
mark-i-m:anon_param_error_now
branch
from
8474bbd
to
c4f7289
Aug 18, 2018
This comment has been minimized.
This comment has been minimized.
|
|
mark-i-m
force-pushed the
mark-i-m:anon_param_error_now
branch
from
c4f7289
to
e1bff31
Aug 20, 2018
mark-i-m
referenced this pull request
Aug 22, 2018
Merged
Remove anonymous trait params from 2018 and beyond #53612
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I guess maybe it's orthogonal? @bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Aug 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Yes, they are orthogonal. This PR enables the warning in 2015. The other PR disables anonymous params in 2018. |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Aug 25, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-review
and removed
S-waiting-on-bors
labels
Aug 25, 2018
This comment has been minimized.
This comment has been minimized.
|
Huh? Sorry, I didn't notice that Travis failed. |
This comment has been minimized.
This comment has been minimized.
|
The failure is from AppVeyor (Windows), not Travis
|
kennytm
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Aug 25, 2018
bors
added a commit
that referenced
this pull request
Aug 25, 2018
This comment has been minimized.
This comment has been minimized.
|
Thanks! Also, I think I forgot to change this to Allow-by-default as discussed in #53272 (comment). |
mark-i-m
added some commits
Aug 11, 2018
mark-i-m
force-pushed the
mark-i-m:anon_param_error_now
branch
from
9e41e9d
to
548f28e
Aug 27, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Aug 27, 2018
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis I think this should be ready for one last review. Also since #53612 merged two days ago, this is already an error in 2018 edition. |
This comment has been minimized.
This comment has been minimized.
|
Oh, you beat me to it! Thanks :) |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Aug 28, 2018
This comment has been minimized.
This comment has been minimized.
|
|
mark-i-m commentedAug 11, 2018
•
edited
cc #41686 rust-lang/rfcs#2522
cc @Centril @nikomatsakis
TODO:
_ : FooEDIT: It seems I already did the last two in #48309