Skip to content

Conversation

bjoernager
Copy link

@bjoernager bjoernager commented Sep 18, 2024

The encode_utf8 method in char should be marked const to support compile-time conversions.

Rendered

@Aloso
Copy link

Aloso commented Sep 18, 2024

Changes this small don't require an RFC.

@bjoernager
Copy link
Author

Oh, alright then. I'll just submit the implementation directly.

Should I just close this PR now?

@tgross35
Copy link
Contributor

libs-api needs to discuss all library-related API changes. A PR to rust-lang/rust with a libs-api reviewer is fine for anything relatively trivial (like this, adding const is pretty easy), an ACP is good for anything that requires a design or more thought (an ACP is just an issue template at rust-lang/libs-team), and RFCs are really only needed if it is a more fundamental change.

It looks like you already put a PR up at rust-lang/rust#130511, so this can be closed. Thanks for putting in the effort!

@tgross35 tgross35 closed this Sep 18, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 19, 2024
… r=dtolnay

Support `char::encode_utf8` in const scenarios.

This PR implements [`rust-lang/rfcs#3696`](rust-lang/rfcs#3696).

This assumes [`const_slice_from_raw_parts_mut`](rust-lang#67456).
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2024
…=dtolnay

Support `char::encode_utf8` in const scenarios.

This PR implements [`rust-lang/rfcs#3696`](rust-lang/rfcs#3696).

This assumes [`const_slice_from_raw_parts_mut`](rust-lang#67456).
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Sep 21, 2024
Support `char::encode_utf8` in const scenarios.

This PR implements [`rust-lang/rfcs#3696`](rust-lang/rfcs#3696).

This assumes [`const_slice_from_raw_parts_mut`](rust-lang/rust#67456).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants