-
Notifications
You must be signed in to change notification settings - Fork 174
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 CharULE::from_array<N>(chars: [char; N]) -> [CharULE; N] #2491
Comments
It is whenever https://doc.rust-lang.org/stable/std/primitive.array.html#method.map stabilizes for const, but not before. We're not really doing to/from ULE conversions over const since traits can't be invoked in const anyway. I'd prefer we don't do this: it's impossible to do until |
This isn't true. We already have https://unicode-org.github.io/icu4x-docs/doc/zerovec/ule/struct.RawBytesULE.html#method.from_array It doesn't use |
When such a function is added, we still can't avoid the necessity of type-specific conversion functions, since it seems unlikely that we'll be able to call trait functions in const in the near term. In other words, we will need one of the following for each ULE type:
|
Related: #1935 |
Add const-evaluable
CharULE::from_array<N>(chars: [char; N]) -> [CharULE; N]
. (I'm not sure if const evaluation is powerful enough to do this.)The text was updated successfully, but these errors were encountered: