Skip to content

Should fix unit tests by default as well #8

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

Closed
alexcrichton opened this issue May 17, 2018 · 2 comments
Closed

Should fix unit tests by default as well #8

alexcrichton opened this issue May 17, 2018 · 2 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@alexcrichton
Copy link
Member

Currently I think the suggestion is to run cargo fix but this currently means that unit tests, benchmarks, etc, will not be fixed. This can be a poor experience where you fix your way into the 2018 edition only to hit a roadblock when you execute cargo test.

I see one of two possibilities here:

  • First up we could change cargo fix to automatically fix all Cargo targets by default. I like this in that it's sort of what I think we want, but I also don't like this in that it's still not guaranteed to fix everything. We'd need to encourage users to also do things like cargo fix -- --all-targets --all-features (in today's sytnax)
  • We could alternatively add documentation to the edition guide suggesting that before enabling edition = '2018' you should attempt to fix all targets. This would involve both the --all-targets flag (perhaps) as well as things like --feature foo for the specific local crate.

I'm personally leaning towards the latter, but I'm curious what others think!

cc @killercup

@alexcrichton
Copy link
Member Author

Hm bah but currently you also have to write #![feature(rust_2018_preview)] everywhere which is a bummer...

@steveklabnik steveklabnik added enhancement New feature or request question Further information is requested labels May 22, 2018
@Mark-Simulacrum
Copy link
Member

Closing as duplicate of #19.

@Mark-Simulacrum Mark-Simulacrum added this to the Preview 2 milestone Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants