-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-mir-optArea: MIR optimizationsArea: MIR optimizationsA-strArea: str and StringArea: str and String
Description
This might be a long shot, but it would be really nice if Rust could do this. I'm working on an embedded application, where I draw some text. For a single symbol, I need to use a different font than I use to draw the rest of the text. Right now, Rust doesn't know that I use a single character and the binary contains all of the unnecessary text processing code to map that character to an index and to draw it.
It would be really cool if Rust could recognize that my string is a constant instead of a black box value.
I've reduced an example: https://rust.godbolt.org/z/GrnE79
Metadata
Metadata
Assignees
Labels
A-mir-optArea: MIR optimizationsArea: MIR optimizationsA-strArea: str and StringArea: str and String