-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Transition liballoc to Rust 2018 #58081
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks generally good overall -- I'm a bit concerned we might be losing some of the bounds on some impls with regards to lifetimes -- but presuming those are all inferred anyway then seems fine.
I would personally prefer 2018-related changes separate from the formatting and cleanup, but don't care too much I guess.
This comment has been minimized.
This comment has been minimized.
Out of curiosity, which did you use? |
@shepmaster I enabled: #![deny(rust_2018_idioms)]
#![allow(explicit_outlives_requirements)] since we might want to leave some things inferred but not others, and then I fixed some errors. |
Reverted most of the nested import style changes. As for the |
This might not be the place to discuss this, but I personally mildly dislike adding |
Anything we aren't enforcing via lints will get forgotten and thus become inconsistent. I don't have a strong opinion either way, but I really want this PR merged. Can you remove the unnecessary |
The |
Oh yea, moving from explicit lifetimes to inferred once is definitely a gain. Since the idoom lints are enforcing the other lifetimes, I agree that they are uncontroversial until proven otherwise (by writing RFCs and changing the lints). @bors r+ |
📌 Commit 2396780 has been approved by |
Transition liballoc to Rust 2018 This transitions liballoc to Rust 2018 edition and applies relevant idiom lints. I also did a small bit of drive-by cleanup along the way. r? @oli-obk I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.
☀️ Test successful - checks-travis, status-appveyor |
This commit ports rust-lang/rust commit e70c2fbd5cbe8bf176f1ed01ba9a53cec7e842a5 "liballoc: elide some lifetimes". Part of rust-lang/rust#58081: Transition liballoc to Rust 2018.
This transitions liballoc to Rust 2018 edition and applies relevant idiom lints.
I also did a small bit of drive-by cleanup along the way.
r? @oli-obk
I started with liballoc since it seemed easiest. In particular, adding
edition = "2018"
to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.