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
Closed
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.

Comments

@nikomatsakis
Copy link
Contributor

@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
Copy link
Contributor

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

@petrochenkov petrochenkov added the T-lang Relevant to the language team, which will review and decide on the RFC. label Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

2 participants