-
Notifications
You must be signed in to change notification settings - Fork 13.3k
String conversion updates #18976
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
String conversion updates #18976
Conversation
cc. @aturon @alexcrichton |
a95454b
to
3186880
Compare
I have not been able to move |
#18885 should remove the necessity for |
Oh nice. It would need to be somewhere up the dependence tree from |
Ah, yes, I suppose the |
You should be able to implement |
Otherwise this looks great by the way, thanks @bjz! |
Do you mind if I implement |
@bjz I'd prefer to not expand the API of |
Ok |
For consistancy with ToString
This also impls `FormatWriter` for `Vec<u8>`
0011edb
to
d82a7ea
Compare
I'm still running the tests locally, but you can check out my latest commit. |
Ok, it passes my tests |
@@ -41,6 +41,7 @@ pub use ops::{Fn, FnMut, FnOnce}; | |||
// Reexported functions | |||
pub use iter::{range, repeat}; | |||
pub use mem::drop; | |||
pub use str::from_str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexcrichton What do you think about this addition to the prelude? We have very few free fns in the prelude, but this seems like a potentially-reasonable candidate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexcrichton Nevermind, I didn't realize this was already in the std prelude.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry I'm a little late to the part, it appears you've already discovered what I was going to say! I'd personally like to remove this from the prelude, however, but that can come later with prelude stabilization.
@bjz This is fabulous, really excited to land this cleanup! My only hesitation is about the addition to the prelude; want to get @alexcrichton's opinion on that. Otherwise, r=me. |
Which addition did I make? |
@bjz Ah -- I meant the addition of |
The exact version is rustc 0.13.0-dev (0b7b4f075 2014-11-16 22:36:50 +0000) and the relevant upstream issues are rust-lang/rust#18752 and rust-lang/rust#18976. Fixes gfx-rs#439.
The exact version is rustc 0.13.0-dev (0b7b4f075 2014-11-16 22:36:50 +0000) and the relevant upstream issues are rust-lang/rust#18752 and rust-lang/rust#18976. Fixes gfx-rs#439.
…neric-args fix: Fix a bug where enum variants were not considered properly in type ns resolution
Working towards the completion of rust-lang/rfcs#369 (tracked in #18640).
[breaking-change]
std::from_str::{FromStr, from_str}
have been moved to{core, std}::str
.std::to_string::IntoStr
has been renamed toIntoString
and moved tocollections::string
.std::to_string::ToString
has been moved tocollections::string
.std::{from_str, to_str}
have been removed.