Skip to content

Stabilize LocalKey::try_with - #48585

Merged
bors merged 4 commits into
masterfrom
unknown repository
Mar 2, 2018
Merged

Stabilize LocalKey::try_with#48585
bors merged 4 commits into
masterfrom
unknown repository

Conversation

@ghost

Copy link
Copy Markdown

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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2018
@alexcrichton

Copy link
Copy Markdown
Member

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

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

Copy link
Copy Markdown
Author

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
Copy Markdown
Member

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

@CentrilCentril added the T-libs-api [DEPRECATED; DO NOT USE] label Feb 28, 2018
@ghost

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
Member

@bors: r+

@bors

bors commented Feb 28, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 27fae2b has been approved by alexcrichton

@borsbors 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
Copy Markdown
Member

Looks like a libstd test may be failing?

@ghost

ghost commented Mar 1, 2018

Copy link
Copy Markdown
Author

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

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Mar 1, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit cb56b2d has been approved by alexcrichton

@ManishearthManishearth mentioned this pull request Mar 1, 2018
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?
Closesrust-lang#27716
r? @alexcrichton
@ManishearthManishearth mentioned this pull request Mar 2, 2018
@bors
bors merged commit cb56b2d into rust-lang:masterMar 2, 2018
@ghost
ghost deleted the stabilize-localkey-try_with branch March 2, 2018 11:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@alexcrichton@bors@Centril@rust-highfive