-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rust 2018 #1013
Rust 2018 #1013
Conversation
Aside from the failing |
Yeah, I'll take a closer look at those and favor |
It looks like many or most of these are false positives; for example |
This looks phenomenal, and I'm excited to merge it soon! Apart from the changes I've made, I had the following comments:
|
I think I did that primarily to make sure I caught everything / for demonstration purposes. It could just as easily be
Right, thanks for the reminder.
Almost certainly;
Nothing jumps out at me, and I think
Could be; I'll look for these at the same time as I look for instances of 3) Do you have a preference for commit order (e.g. one commit per crate), or is this likely to be squashed in the end? |
Got it. In that case, I think we should remove all of the
I don't mind having multiple commits - this is a significant endeavor after all - but we should make sure that all code/tests compile/pass after each commit is applied. In other words, each commit should be valid on its own. |
I've redone this from the start with a more consistent and thorough methodology. For each crate:
A similar set of steps was done with everything I've pushed these changes to let the CI find anything I missed that might differ between features or debug/release. Remaining steps that I want to take before a real review:
I don't currently plan to handle:
|
8fd4ed7
to
823ef8b
Compare
@SergioBenitez I think this is almost ready for another review. If we like the changes in "elide lifetimes in 'http'" and "elide lifetimes in 'core'", I'll apply the same to other crates. But it is a fairly tedious manual replacement task because of rust-lang/rust#46944 and rust-lang/rust#53738, and I have almost certainly missed several elidable lifetimes. |
This all looks phenomenal to me! One tiny note: One more note: I believe the only doc links that don't work are ones that didn't work prior to this change as well. In particular, links in the |
Agreed. That should be an easy change.
The last time I checked them, and unless something changed, I think the current broken links are 1:1 with cross-crate links in crateA that look like "[crateB::thing]" where crateA does not depend on crateB. |
And done. I only found two or three. I also just fixed a few warnings I caught at the last minute, and I feel pretty good about this aside from possible commit rewording/squashing. |
This includes two changes:
cargo fix --edition --all-features
and enablingedition = "2018"
for every crate. Minor additional changes/cleanups were made, such as one instance ofdyn
used as a variable name.#![deny(rust_2018_idioms)]
and runningcargo fix --all-features
for all crates except for examples.cargo fix
seemed to mess up one or twoextern crate
s, but overall worked quite well!This does not address:
extern crate
s that survived because we#[macro_use]
them; these would also be possible to remove if desired e.g.#[macro_use] extern crate lazy_static;
can be replaced bylazy_static::lazy_static!()
.core/lib/benches
, which already weren't compiling anyway?hello_2018
example is mostly redundant now, but I think it does some tricks with macro scoping tests that might be worth keeping if the example is removed.