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

sync thread_local key conditions exactly with what the macro uses #102783

Merged
merged 3 commits into from
Oct 14, 2022

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 7, 2022

This makes the cfg in mod.rs syntactically the same as those in local.rs.

I don't think this should actually change anything, but seems better to be consistent?
I looked into this due to #102549, but this PR would make it less likely that __OsLocalKeyInner is going to get provided, so this cannot help with that issue.

r? @thomcc

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Oct 7, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2022
@thomcc
Copy link
Member

thomcc commented Oct 8, 2022

Yep, LGTM.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 8, 2022

📌 Commit 0910bd0 has been approved by thomcc

It is now in the queue for this repository.

@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 Oct 8, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 8, 2022
sync thread_local key conditions exactly with what the macro uses

This makes the `cfg` in `mod.rs` syntactically the same as those in `local.rs`.

I don't think this should actually change anything, but seems better to be consistent?
I looked into this due to rust-lang#102549, but this PR would make it *less* likely that `__OsLocalKeyInner` is going to get provided, so this cannot help with that issue.

r? `@thomcc`
@Dylan-DPC
Copy link
Member

failed in rollup

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 8, 2022
@matthiaskrgr
Copy link
Member

@bors r-
Failed in #102801 (comment)

@RalfJung
Copy link
Member Author

RalfJung commented Oct 8, 2022

@bors rollup=iffy r=thomcc

@bors
Copy link
Contributor

bors commented Oct 8, 2022

📌 Commit 053f834bdbbffe755f6206598a160021f647ef4f has been approved by thomcc

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2022
@RalfJung
Copy link
Member Author

RalfJung commented Oct 8, 2022

@bors rollup=iffy r=thomcc

@bors
Copy link
Contributor

bors commented Oct 8, 2022

📌 Commit 527fa5f683381f5d9fd721c7368c8930db8f91fc has been approved by thomcc

It is now in the queue for this repository.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 8, 2022

@thomcc I realized there is a smarter way to avoid the warning about __FastLocalKeyInner being unused -- and added that to this PR, since it touches that code anyway. Could you take a look?

@RalfJung
Copy link
Member Author

@bors r-
@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2022
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 11, 2022
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 14, 2022
@RalfJung
Copy link
Member Author

@bors r=thomcc

@bors
Copy link
Contributor

bors commented Oct 14, 2022

📌 Commit 5218e24 has been approved by thomcc

It is now in the queue for this repository.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 14, 2022

⌛ Testing commit 5218e24 with merge 7a58723a62744a73f1a94066a93e981f82b6a3f3...

@bors
Copy link
Contributor

bors commented Oct 14, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 14, 2022
albertlarsan68 added a commit to albertlarsan68/rust that referenced this pull request Oct 14, 2022
sync thread_local key conditions exactly with what the macro uses

This makes the `cfg` in `mod.rs` syntactically the same as those in `local.rs`.

I don't think this should actually change anything, but seems better to be consistent?
I looked into this due to rust-lang#102549, but this PR would make it *less* likely that `__OsLocalKeyInner` is going to get provided, so this cannot help with that issue.

r? `@thomcc`
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#######################################################                   76.8%curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104

error: failed to download llvm from ci

help: old builds get deleted after a certain time
help: if trying to compile an old commit of rustc, disable `download-ci-llvm` in config.toml:
[llvm]
download-ci-llvm = false

Build completed unsuccessfully in 0:00:56

@RalfJung
Copy link
Member Author

@bors retry failed to download llvm from ci

@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 Oct 14, 2022
@bors
Copy link
Contributor

bors commented Oct 14, 2022

⌛ Testing commit 5218e24 with merge 5819f41...

@bors
Copy link
Contributor

bors commented Oct 14, 2022

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 5819f41 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 14, 2022
@bors bors merged commit 5819f41 into rust-lang:master Oct 14, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 14, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5819f41): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-3.2%, -0.9%] 16
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.8% [1.7%, 4.0%] 3
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-1.6% [-1.6%, -1.6%] 1
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) 1.7% [-1.6%, 4.0%] 4

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@RalfJung RalfJung deleted the tls branch October 21, 2022 09:48
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
sync thread_local key conditions exactly with what the macro uses

This makes the `cfg` in `mod.rs` syntactically the same as those in `local.rs`.

I don't think this should actually change anything, but seems better to be consistent?
I looked into this due to rust-lang#102549, but this PR would make it *less* likely that `__OsLocalKeyInner` is going to get provided, so this cannot help with that issue.

r? `@thomcc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants