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

Tracking Issue for const_char_encode_utf16 #130660

Closed
3 tasks done
bjoernager opened this issue Sep 21, 2024 · 6 comments · Fixed by #132153
Closed
3 tasks done

Tracking Issue for const_char_encode_utf16 #130660

bjoernager opened this issue Sep 21, 2024 · 6 comments · Fixed by #132153
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting

Comments

@bjoernager
Copy link
Contributor

bjoernager commented Sep 21, 2024

Feature gate: #![feature(const_char_encode_utf16)]

This is a tracking issue for supporting char::encode_utf16 in const scenarios.

Public API

impl char {
    pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16];
}

Steps / History

Unresolved Questions

  • None yet.
@bjoernager bjoernager added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 21, 2024
@bjoernager
Copy link
Contributor Author

I don't think char::decode_utf16 currently can be implemented as const due to its dependence on IntoIterator.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 21, 2024
…r=<try>

Support `char::encode_utf16` in const scenarios.

Relevant tracking issue: rust-lang#130660

The method `char::encode_utf16` should be marked "const" to allow compile-time conversions.

This PR additionally rewrites the `encode_utf16_raw` function for better readability whilst also reducing the amount of unsafe code.

try-job: x86_64-msvc
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 22, 2024
…, r=dtolnay

Support `char::encode_utf16` in const scenarios.

Relevant tracking issue: rust-lang#130660

The method `char::encode_utf16` should be marked "const" to allow compile-time conversions.

This PR additionally rewrites the `encode_utf16_raw` function for better readability whilst also reducing the amount of unsafe code.

try-job: x86_64-msvc
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 23, 2024
…, r=dtolnay

Support `char::encode_utf16` in const scenarios.

Relevant tracking issue: rust-lang#130660

The method `char::encode_utf16` should be marked "const" to allow compile-time conversions.

This PR additionally rewrites the `encode_utf16_raw` function for better readability whilst also reducing the amount of unsafe code.

try-job: x86_64-msvc
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 23, 2024
…, r=dtolnay

Support `char::encode_utf16` in const scenarios.

Relevant tracking issue: rust-lang#130660

The method `char::encode_utf16` should be marked "const" to allow compile-time conversions.

This PR additionally rewrites the `encode_utf16_raw` function for better readability whilst also reducing the amount of unsafe code.

try-job: x86_64-msvc
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Sep 23, 2024
Rollup merge of rust-lang#130659 - bjoernager:const-char-encode-utf16, r=dtolnay

Support `char::encode_utf16` in const scenarios.

Relevant tracking issue: rust-lang#130660

The method `char::encode_utf16` should be marked "const" to allow compile-time conversions.

This PR additionally rewrites the `encode_utf16_raw` function for better readability whilst also reducing the amount of unsafe code.

try-job: x86_64-msvc
@dtolnay
Copy link
Member

dtolnay commented Sep 23, 2024

@rfcbot fcp merge

Enabled by the recent stabilization of &mut in const (#129195).

@rfcbot
Copy link

rfcbot commented Sep 23, 2024

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 23, 2024
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Oct 23, 2024
@rfcbot
Copy link

rfcbot commented Oct 23, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Nov 2, 2024
@rfcbot
Copy link

rfcbot commented Nov 2, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@bjoernager
Copy link
Contributor Author

Stabilised by #132153.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Nov 2, 2024
…, r=dtolnay

Stabilise `const_char_encode_utf16`.

Closes: rust-lang#130660

This PR stabilises the `const_char_encode_utf16` feature gate (i.e. support for `char::encode_utf16` in constant expressions).

~~Note that the linked tracking issue is as of this writing currently awaiting FCP until 2024-11-02.~~
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 4, 2024
…, r=dtolnay

Stabilise `const_char_encode_utf16`.

Closes: rust-lang#130660

This PR stabilises the `const_char_encode_utf16` feature gate (i.e. support for `char::encode_utf16` in constant expressions).

~~Note that the linked tracking issue is as of this writing currently awaiting FCP until 2024-11-02.~~
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Nov 4, 2024
…, r=dtolnay

Stabilise `const_char_encode_utf16`.

Closes: rust-lang#130660

This PR stabilises the `const_char_encode_utf16` feature gate (i.e. support for `char::encode_utf16` in constant expressions).

~~Note that the linked tracking issue is as of this writing currently awaiting FCP until 2024-11-02.~~
tgross35 added a commit to tgross35/rust that referenced this issue Nov 5, 2024
…, r=dtolnay

Stabilise `const_char_encode_utf16`.

Closes: rust-lang#130660

This PR stabilises the `const_char_encode_utf16` feature gate (i.e. support for `char::encode_utf16` in constant expressions).

~~Note that the linked tracking issue is as of this writing currently awaiting FCP until 2024-11-02.~~
@bors bors closed this as completed in 1ee6617 Nov 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 5, 2024
Rollup merge of rust-lang#132153 - bjoernager:const-char-encode-utf16, r=dtolnay

Stabilise `const_char_encode_utf16`.

Closes: rust-lang#130660

This PR stabilises the `const_char_encode_utf16` feature gate (i.e. support for `char::encode_utf16` in constant expressions).

~~Note that the linked tracking issue is as of this writing currently awaiting FCP until 2024-11-02.~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants