-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make duration constructor functions const
.
#33029
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
Comments
You cannot use a |
I'm not totally sure I understand that, @nagisa - stable users of the compiler will see no change and people on nightlies will be able to take advantage of the const-ness. |
Now impossible until we allow panics in |
This is going to depend on what happens with rust-lang/rfcs#1383. Let's continue to track this as part of #24111 as Alex commented in #33033 (comment):
|
Is there anything stopping the functions
from_millis, from_secs and new
instd::time::Duration
from being constant?The text was updated successfully, but these errors were encountered: