Skip to content
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

Add a --edition-idioms flag to cargo fix #5843

Merged
merged 1 commit into from
Aug 2, 2018

Conversation

alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Jul 31, 2018

This, like --prepare-for, will be part of the transition guide which
automatically applies the necessary lint group from the compiler to associated
code.

cc rust-lang/rust#52679

@rust-highfive
Copy link

r? @matklad

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton alexcrichton added this to the Edition Preview 2 milestone Jul 31, 2018
@alexcrichton
Copy link
Member Author

r? @killercup

@rust-highfive rust-highfive assigned killercup and unassigned matklad Jul 31, 2018
@alexcrichton alexcrichton changed the title Add a --idioms-for flag to cargo fix Add a --idioms flag to cargo fix Jul 31, 2018
@alexcrichton
Copy link
Member Author

I've updated this to just have a --idioms flag which is used to lint for whichever idioms the edition being compiled for is in.

@zackmdavis
Copy link
Member

I've updated this to just have a --idioms flag

Is there a missing commit? I only see --idioms-for in 5ce924f.

Speaking only for myself, I much prefer the semantics of --idioms-for 2018 rather than an --idioms flag that infers a rust_20XX_idioms lint group: most lints are about encouraging idiomatic code (e.g., while-true) and have nothing to do with migrating between editions. (Even if the current focus of cargo fix development is on the edition migration, the tool is more general than that, and its CLI should reflect that promise.)

@zackmdavis
Copy link
Member

If the goal is to avoid needing to specify 2018 as an argument (as #5845 seems to suggest), perhaps --edition-idioms?

@alexcrichton
Copy link
Member Author

Oops sorry forgot to push up the commits, and --edition-idioms sounds good to me!

@alexcrichton alexcrichton changed the title Add a --idioms flag to cargo fix Add a --edition-idioms flag to cargo fix Aug 1, 2018
@alexcrichton
Copy link
Member Author

@bors: r+

Ok I'm gonna go ahead and try to squeeze this in for the preview, but we can of course continue to iterate in-tree!

This, like `--prepare-for`, will be part of the transition guide which
automatically applies the necessary lint group from the compiler to associated
code.

The `--edition-idioms` flag does not take an argument and will automatically
enable the right lint group based on the edition being compiled for.

cc #52679
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Collaborator

bors commented Aug 2, 2018

📌 Commit 80f9d31 has been approved by alexcrichton

bors added a commit that referenced this pull request Aug 2, 2018
Add a `--edition-idioms` flag to `cargo fix`

This, like `--prepare-for`, will be part of the transition guide which
automatically applies the necessary lint group from the compiler to associated
code.

cc rust-lang/rust#52679
@bors
Copy link
Collaborator

bors commented Aug 2, 2018

⌛ Testing commit 80f9d31 with merge 15433e8...

@bors
Copy link
Collaborator

bors commented Aug 2, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 15433e8 to master...

@bors bors merged commit 80f9d31 into rust-lang:master Aug 2, 2018
@alexcrichton alexcrichton deleted the idioms-for branch August 3, 2018 05:05
@ehuss ehuss modified the milestones: Edition Preview 2, 1.29.0 Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants