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

Add an &str.to_managed method to allow creating non-constant @str values... #3657

Closed
wants to merge 2 commits into from

Conversation

Dretch
Copy link
Contributor

@Dretch Dretch commented Oct 4, 2012

... (for issue #3433).

@Dretch
Copy link
Contributor Author

Dretch commented Oct 4, 2012

FWIW this uses a rustrt upcall function, which I suspect may not be kosher, but I don't know. It is at least fairly simple and non-magical.

@brson
Copy link
Contributor

brson commented Oct 4, 2012

Thanks! Your hunch is correct - the upcall_new_str runtime functions are obsolete and unused, should be deleted. A simple way to write this in Rust would be to use at_vec::from_fn, then cast::transmute to an @str.

@nikomatsakis
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants