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 upAdd an extended prelude for the 2018 editions #51434
Conversation
rust-highfive
assigned
withoutboats
Jun 8, 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
Jun 8, 2018
SimonSapin
referenced this pull request
Jun 8, 2018
Closed
Tracking issue for the 2018 edition’s prelude #51418
SimonSapin
added
T-libs
WG-epoch
A-rust-2018-preview
labels
Jun 8, 2018
SimonSapin
force-pushed the
SimonSapin:edition-prelude
branch
from
f76c08b
to
eb51dfd
Jun 8, 2018
This comment has been minimized.
This comment has been minimized.
|
Yay more prelude. But how will the decision be made for proposed extensions such as: |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure if I think we can, in theory, write lint to the rust-2018-compatibility group that changes calls to methods that become ambiguous to their fully qualified form. But I'd rather hear from @Manishearth who has way more experience with this and can better judge the |
SimonSapin
added
the
E-help-wanted
label
Jun 9, 2018
This comment has been minimized.
This comment has been minimized.
|
@leodasvacas I think that a decision for each of these needs to be made on a case-by-case basis, and not necessarily in this PR. @killercup I just checked https://rust-lang.github.io/rfcs/2052-epochs.html#a-broad-policy-on-epoch-changes and having rustfix automate the transition would be nice to have but per the RFC it is a requirement that code that would break warns in the previous edition. Unfortunately I don’t know how to go about implementing that warning… |
This comment has been minimized.
This comment has been minimized.
|
Lint feels a bit tricky to handle. Unsure what edge cases exist, though, so it might not be that tricky. |
estebank
reviewed
Jun 12, 2018
| @@ -42,6 +42,7 @@ error[E0573]: expected type, found variant `Ok` | |||
| LL | fn foo() -> Ok { | |||
| | ^^ not a type | |||
| | | |||
| = help: there is an enum variant `std::prelude::rust2018::Ok`, try using `std::prelude::rust2018`? | |||
| = help: there is an enum variant `std::prelude::v1::Ok`, try using `std::prelude::v1`? | |||
This comment has been minimized.
This comment has been minimized.
estebank
Jun 12, 2018
Contributor
Just noticed this terrible suggestion. std::prelude::v1 is not an enum!
This comment has been minimized.
This comment has been minimized.
|
Ping from triage! What's the status on this? |
This comment has been minimized.
This comment has been minimized.
|
This is blocked on additional implementation work (a warning on 2015-edition code that would break in the 2018 edition) that I don’t know how to do… or deciding an exception for this “hard requirement” stated in the RFC. |
This comment has been minimized.
This comment has been minimized.
|
Closing for now to make triage easier. This is still tracked at #51418. |
SimonSapin commentedJun 8, 2018
•
edited
As proposed in #51418.
Update: Per discussion below this PR also needs to add a warning for 2015 edition code that would break with the new prelude. Help wanted: any ideas how to make that happen?