-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Why isn't the Copy trait implemented for String? #123263
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
Comments
@Toni-Graphics Hello, is your question answered by consulting the String docs or Copy docs? |
Hm. It seems it takes quite a while for the String docs to even imply that the value might be heap-allocated and thus not possible to trivially Copy... "btw this allocates" should probably be one of the first things on it (not in detail, that's covered in Representation). |
@rustbot claim |
Just a tiny addition. Helps with rust-lang#123263.
Just a tiny addition. Helps with rust-lang#123263.
…ingjubilee doc: mention heap allocation earlier in String docs Just a tiny addition. Helps with rust-lang#123263.
I think it's safe to close now?.. |
Yes |
Why isn't the Copy trait implemented for the type String?
I tried this code:
But i got following error:
The text was updated successfully, but these errors were encountered: