Skip to content

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

Closed
@nikomatsakis

Description

@nikomatsakis

@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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions