-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Make str::ends_with a const fn #50899
Comments
This is very hard! We need I don't think this can be done any time soon and keeping an extra issue open for it is not really much use. There's also a chance we need a new RFC entirely to be able to do this (due to the internal indexing traits being involved) Once all the prerequisites are fulfilled we'll definitely do this though. |
👍 thanks for the quick response! |
Hi @oli-obk, I hope you don’t mind me bringing this up again. Since the linked PR has been merged and a couple of years have passed, do you think it would now be possible to implement this feature? |
The groundwork for this is happening right now under the |
Currently it can't be called from a
const fn
, which is sad :-(Ordinarily I'd take a pass at implementing this myself, but
str::ends_with
is slightly more complex than meets the eye because of thePattern
abstraction, and I'm not particularly sure how that's best handled.The text was updated successfully, but these errors were encountered: