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

Stabilize LocalKey::try_with #48585

Merged
merged 4 commits into from Mar 2, 2018
Merged

Stabilize LocalKey::try_with #48585

merged 4 commits into from Mar 2, 2018

Conversation

ghost
Copy link

@ghost ghost commented Feb 27, 2018

The LocalKey::try_with method is now stabilized.

LocalKey::state and LocalKeyState marked as deprecated. Although, is there any reason to keep them - should we perhaps remove them completely?

Closes #27716

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2018
@alexcrichton
Copy link
Member

Thanks! Looks like there may be a tidy error though?

@alexcrichton alexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label Feb 27, 2018
@ghost
Copy link
Author

ghost commented Feb 27, 2018

I had to switch LocalKey::try_with from feature thread_local_state to a new feature thread_local_try_with because tidy wants the whole future either stabilized or not.

Should be ok now.

@alexcrichton
Copy link
Member

Oh hm looks like libstd is still using the deprecated items?

@Centril Centril added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 28, 2018
@ghost
Copy link
Author

ghost commented Feb 28, 2018

Passes on Travis now.

It seems LocalKeyState is only used by function print_to, which is called from macros print! and eprint!.

Do you think I should purge LocalKeyState from libstd? Is there any reason to deprecate, but still keep it?

@alexcrichton
Copy link
Member

Nah I'd actually personally be on board with a complete removal of LocalKeyState if we can, the print_to function looks like it can for sure use try_with!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 28, 2018

📌 Commit 27fae2b has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 28, 2018
@alexcrichton
Copy link
Member

Looks like a libstd test may be failing?

@ghost
Copy link
Author

ghost commented Mar 1, 2018

Fixed. It was just a silly mistake - I accidentally deleted the HITS += 1 line.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 1, 2018

📌 Commit cb56b2d has been approved by alexcrichton

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 1, 2018
…h, r=alexcrichton

Stabilize LocalKey::try_with

The `LocalKey::try_with` method is now stabilized.

`LocalKey::state` and `LocalKeyState` marked as deprecated. Although, is there any reason to keep them - should we perhaps remove them completely?

Closes rust-lang#27716

r? @alexcrichton
@bors bors merged commit cb56b2d into rust-lang:master Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants