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

Add MAX_LEN_UTF8 and MAX_LEN_UTF16 Constants #120580

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

HTGAzureX1212
Copy link
Contributor

This pull request adds the MAX_LEN_UTF8 and MAX_LEN_UTF16 constants as per #45795, gated behind the char_max_len feature.

The constants are currently applied in the alloc, core and std libraries.

@HTGAzureX1212 HTGAzureX1212 changed the title Add MAX_LEN_UTF8 and MAX_LEN_UTF16 constants Add MAX_LEN_UTF8 and MAX_LEN_UTF16 Constants Feb 2, 2024
@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2024

r? @m-ou-se

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added O-windows Operating system: Windows 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 Feb 2, 2024
@rust-log-analyzer

This comment has been minimized.

@m-ou-se m-ou-se added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). I-libs-api-nominated Nominated for discussion during a libs-api team meeting. and removed O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 8, 2024
@bors
Copy link
Contributor

bors commented Feb 19, 2024

☔ The latest upstream changes (presumably #121295) made this pull request unmergeable. Please resolve the merge conflicts.

@joshtriplett
Copy link
Member

In the tracking issue, please include a mention that when stabilizing this we should adjust the documentation of https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8 to use it.

@m-ou-se
Copy link
Member

m-ou-se commented Feb 27, 2024

We briefly discussed this in the libs-api meeting and are happy to add these as unstable.
Please open a tracking issue and use that in the #[unstable] attributes. Thanks!

@m-ou-se m-ou-se 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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Feb 27, 2024
@HTGAzureX1212
Copy link
Contributor Author

Tracking issue created. Will finish the remaining things later today.

@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from 177bcc3 to ae30dc9 Compare February 28, 2024 12:14
@rustbot rustbot added the O-windows Operating system: Windows label Feb 28, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from f51dde5 to bee9b68 Compare May 6, 2024 12:12
@HTGAzureX1212
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 6, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from e7f101e to 8c1af11 Compare February 16, 2025 10:56
@rust-log-analyzer

This comment has been minimized.

@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from 9c2fb6c to 7786d80 Compare February 16, 2025 11:14
@rust-log-analyzer

This comment has been minimized.

@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from 7b97537 to d797ebe Compare February 16, 2025 11:33
@HTGAzureX1212
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 16, 2025
@Dylan-DPC Dylan-DPC 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 16, 2025
@HTGAzureX1212 HTGAzureX1212 force-pushed the HTGAzureX1212/issue-45795 branch from 4ccc716 to eec49bb Compare February 16, 2025 13:08
@m-ou-se
Copy link
Member

m-ou-se commented Feb 19, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 19, 2025

📌 Commit eec49bb has been approved by m-ou-se

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 Feb 19, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2025
…45795, r=m-ou-se

Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants

This pull request adds the `MAX_LEN_UTF8` and `MAX_LEN_UTF16` constants as per rust-lang#45795, gated behind the `char_max_len` feature.

The constants are currently applied in the `alloc`, `core` and `std` libraries.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants)
 - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String)
 - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates)
 - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.)
 - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls)
 - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell)
 - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls)
 - rust-lang#137155 (Organize `OsString`/`OsStr` shims)
 - rust-lang#137225 (vectorcall ABI: require SSE2)

Failed merges:

 - rust-lang#136780 (std: move stdio to `sys`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants)
 - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String)
 - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates)
 - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.)
 - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls)
 - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell)
 - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls)
 - rust-lang#137155 (Organize `OsString`/`OsStr` shims)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 84e9f29 into rust-lang:master Feb 20, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 20, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
Rollup merge of rust-lang#120580 - HTGAzureX1212:HTGAzureX1212/issue-45795, r=m-ou-se

Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants

This pull request adds the `MAX_LEN_UTF8` and `MAX_LEN_UTF16` constants as per rust-lang#45795, gated behind the `char_max_len` feature.

The constants are currently applied in the `alloc`, `core` and `std` libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows 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.