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

Create AsciiStr from str using const fn #84

Closed
PatrickNorton opened this issue Aug 12, 2021 · 0 comments
Closed

Create AsciiStr from str using const fn #84

PatrickNorton opened this issue Aug 12, 2021 · 0 comments

Comments

@PatrickNorton
Copy link
Contributor

Since mem::transmute will be const-stable in 1.56.0, it would be nice if there was a way to construct an AsciiStr (and AsciiString) at compile-time. Since the from_str function is in a trait, and thus cannot be const yet, we would probably need to add a new method for this.

tormol added a commit to tormol/rust-ascii that referenced this issue Jun 9, 2022
As `const fn` alternatives to the trait-based from_ascii().

Closes tomprogrammer#84
tormol added a commit to tormol/rust-ascii that referenced this issue Jun 9, 2022
As `const fn` alternatives to the trait-based from_ascii().

Closes tomprogrammer#84
tormol added a commit to tormol/rust-ascii that referenced this issue Sep 11, 2022
As `const fn` alternatives to the trait-based from_ascii().

Closes tomprogrammer#84
tormol added a commit to tormol/rust-ascii that referenced this issue Sep 11, 2022
As `const fn` alternatives to the trait-based from_ascii().

Closes tomprogrammer#84
tormol added a commit to tormol/rust-ascii that referenced this issue Sep 12, 2022
As `const fn` alternatives to the trait-based from_ascii().

Closes tomprogrammer#84
@tormol tormol closed this as completed in 8198f04 Sep 18, 2022
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

No branches or pull requests

1 participant