-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 AsciiExt::into_ascii_{upper,lower}case #31335
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
b993070
to
bb01255
Compare
The default implementations (with where Self: Sized) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`). CC rust-lang#27809 (comment)
bb01255
to
700ac0e
Compare
This basically needs to be decided in tandem with #27809 due to impls of traits being insta-stable. This seems fine to me, though. |
Sure, this PR is mostly meant as input for the discussion in #27809. |
The libs team decided to punt discussion of this until FCP for #27809 comes to a close, so removing the T-libs tag |
See #27809 (comment) Thanks @SimonSapin! |
⌛ Testing commit 700ac0e with merge 86ca437... |
💔 Test failed - auto-linux-64-opt |
@bors: retry ummm... what? On Thu, Feb 25, 2016 at 4:53 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 700ac0e with merge 91f1c22... |
💔 Test failed - auto-linux-64-nopt-t |
@bors: retry |
⌛ Testing commit 700ac0e with merge 9af57bc... |
💔 Test failed - auto-win-gnu-64-opt |
@bors: retry On Mon, Feb 29, 2016 at 8:40 PM, bors notifications@github.com wrote:
|
The default implementations (with `where Self: Sized`) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`). CC #27809 (comment) CC @alexcrichton
The addition of these methods in rust-lang#31335 required adding impls of the trait for the `String` and `Vec<T>` types. This unfortunately caused a regression (rust-lang#32074) in type inference for using these methods which the libs team has decided to not push forward with. These methods were stabilized in rust-lang#32020 which was intended to get backported to beta, but the backport hasn't happened just yet. This commit reverts both the addition and stabilization of these methods. One proposed method of handling this, in rust-lang#32076, was to move the methods to an extra trait to avoid conflicts with type inference. After some discussion, however, the libs team concluded that we probably want to reevaluate what we're doing here, so discussion will continue on the tracking issue, rust-lang#27809.
std: Revert addition of `into_ascii_*` methods The addition of these methods in #31335 required adding impls of the trait for the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074) in type inference for using these methods which the libs team has decided to not push forward with. These methods were stabilized in #32020 which was intended to get backported to beta, but the backport hasn't happened just yet. This commit reverts both the addition and stabilization of these methods. One proposed method of handling this, in #32076, was to move the methods to an extra trait to avoid conflicts with type inference. After some discussion, however, the libs team concluded that we probably want to reevaluate what we're doing here, so discussion will continue on the tracking issue, #27809. Closes #32074
The addition of these methods in rust-lang#31335 required adding impls of the trait for the `String` and `Vec<T>` types. This unfortunately caused a regression (rust-lang#32074) in type inference for using these methods which the libs team has decided to not push forward with. These methods were stabilized in rust-lang#32020 which was intended to get backported to beta, but the backport hasn't happened just yet. This commit reverts both the addition and stabilization of these methods. One proposed method of handling this, in rust-lang#32076, was to move the methods to an extra trait to avoid conflicts with type inference. After some discussion, however, the libs team concluded that we probably want to reevaluate what we're doing here, so discussion will continue on the tracking issue, rust-lang#27809. Conflicts: src/libstd/ascii.rs
The default implementations (with
where Self: Sized
) are so that methods that takeself
by value can exist in a trait that’s implemented for dynamically-sized types (str
and[u8]
).CC #27809 (comment)
CC @alexcrichton