Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 13, 2024

Back in #101401, these were changed to const to make some functions const fn. However, @dtolnay was not happy about this. Meanwhile, const fn can access immutable statics like these, so we can change this back.

Part of #101400.

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 13, 2024
@RalfJung RalfJung changed the title switch unicode-data back to 'static' switch unicode-data bitsets back to 'static' Oct 13, 2024
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

I wonder if it makes any difference to change the types from &'static [T; N] to [T; N]. That's how it was prior to #101401. r=me either way.

@RalfJung RalfJung force-pushed the unicode-bitset-static branch from 5f1e903 to 90e4f10 Compare October 13, 2024 09:53
@RalfJung
Copy link
Member Author

Ah good point, I had missed that. Yes we can make them arrays again without an extra indirection.

@bors r=dtolnay

@bors
Copy link
Collaborator

bors commented Oct 13, 2024

📌 Commit 90e4f10 has been approved by dtolnay

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 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 13, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131086 (Update unicode-width to 0.2.0)
 - rust-lang#131585 (compiletest: Remove the one thing that was checking a directive's `original_line`)
 - rust-lang#131614 (Error on trying to use revisions in `run-make` tests)
 - rust-lang#131638 (compiletest: Move debugger setup code out of `lib.rs`)
 - rust-lang#131641 (switch unicode-data bitsets back to 'static')
 - rust-lang#131642 (Special case error message for a `build-fail` test that failed check build)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 84dd8cd into rust-lang:master Oct 13, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 13, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 13, 2024
Rollup merge of rust-lang#131641 - RalfJung:unicode-bitset-static, r=dtolnay

switch unicode-data bitsets back to 'static'

Back in rust-lang#101401, these were changed to `const` to make some functions `const fn`. However, `@dtolnay` was [not happy](rust-lang#101400 (comment)) about this. Meanwhile, `const fn` can access immutable statics like these, so we can change this back.

Part of rust-lang#101400.
@tgross35 tgross35 assigned dtolnay and unassigned tgross35 Oct 13, 2024
@RalfJung RalfJung deleted the unicode-bitset-static branch October 14, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants