Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uppermit long borrows of constants where possible (rvalue promotion) #1056
Comments
nikomatsakis
referenced this issue
Apr 10, 2015
Closed
Rust's system for globals / constants is not ideal #398
This comment has been minimized.
This comment has been minimized.
|
This is implemented and stabilized! |
petrochenkov
closed this
Jan 29, 2018
petrochenkov
added
the
T-lang
label
Jan 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nikomatsakis commentedApr 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".