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

String literals should be constant #879

Closed
brson opened this issue Sep 2, 2011 · 2 comments
Closed

String literals should be constant #879

brson opened this issue Sep 2, 2011 · 2 comments

Comments

@brson
Copy link
Contributor

brson commented Sep 2, 2011

Currently string literals are allocated and copied from constant C strings on instantiation, which is quite wasteful.

@marijnh
Copy link
Contributor

marijnh commented Sep 6, 2011

I agree that it's unfortunate for string literals to be non-constant. Unless we give them type @str, there doesn't seem to be a way around this though. Raw new-style strings own their memory. Whether that's a good idea is another discussion, but in this system you can't reuse string values.

@graydon
Copy link
Contributor

graydon commented Apr 11, 2012

Subsumed into #2112, closing.

@graydon graydon closed this as completed Apr 11, 2012
arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
RFC to lex binary and octal literals more eagerly.
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Add addr replacement handling of memtransfer

* Update test
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants