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

permit long borrows of constants where possible (rvalue promotion) #1056

Closed
nikomatsakis opened this Issue Apr 10, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 10, 2015

@eddyb did a lot of great work identifying constants that can be safely promoted into static values, which we are using to improve our code generation. However, we don't expose this information to the end-user, except in the special case of an empty vector literal like &[]. We should fix this!

The main work here is going through the code, writing up the rules found there, and perhaps cleaning them up some for "human consumption".

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Jan 29, 2018

This is implemented and stabilized!
cc rust-lang/rust#38865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.