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

avoid relying on implicit promotion of const fn calls #2

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

RalfJung
Copy link
Contributor

@RalfJung RalfJung commented Dec 28, 2020

There are plans to change the rules for implicit promotion such that calls to const fn are not implicitly promoted to 'static lifetime any more. A crater experiment showed that only very few crates would be affected by this change, and this is one of them.

This PR adjusts the code to no longer rely on implicit promotion, by explicitly putting the result of the function call into a const item. Long-term, there will be the possibility of using inline const expressions instead, which will be more ergonomic.

@denisandroid
Copy link
Member

Interesting, good.

@denisandroid denisandroid merged commit 2b7d093 into clucompany:master Dec 28, 2020
@RalfJung RalfJung deleted the promotion branch December 28, 2020 23:10
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.

2 participants