rust/src/libcore
bors 94ede93467 Auto merge of #44042 - LukasKalbertodt:ascii-methods-on-instrinsics, r=alexcrichton
Copy all `AsciiExt` methods to the primitive types directly in order to deprecate it later

**EDIT:** [this PR is ready now](https://github.com/rust-lang/rust/pull/44042#issuecomment-333883548). I edited this post to reflect the current status of discussion, which is (apart from code review) pretty much settled.

---

This is my current progress in order to prepare stabilization of #39658. As discussed there (and in #39659), the idea is to deprecated `AsciiExt` and copy all methods to the type directly. Apparently there isn't really a reason to have those methods in an extension trait¹.

~~This is **work in progress**: copy&pasting code while slightly modifying the documentation isn't the most exciting thing to do. Therefore I wanted to already open this WIP PR after doing basically 1/4 of the job (copying methods to `&[u8]`, `char` and `&str` is still missing) to get some feedback before I continue. Some questions possibly worth discussing:~~

1. ~~Does everyone agree that deprecating `AsciiExt` is a good idea? Does everyone agree with the goal of this PR?~~ => apparently yes
2. ~~Are my changes OK so far? Did I do something wrong?~~
3. ~~The issue of the unstable-attribute is currently set to 0. I would wait until you say "Ok" to the whole thing, then create a tracking issue and then insert the correct issue id. Is that ok?~~
4. ~~I tweaked `eq_ignore_ascii_case()`: it now takes the argument `other: u8` instead of `other: &u8`. The latter was enforced by the trait. Since we're not bound to a trait anymore, we can drop the reference, ok?~~ => I reverted this, because the interface has to match the `AsciiExt` interface exactly.

¹ ~~Could it be that we can't write `impl [u8] {}`? This might be the reason for `AsciiExt`. If that is the case: is there a good reason we can't write such an impl block? What can we do instead?~~ => we couldn't at the time this PR was opened, but Simon made it possible.

/cc @SimonSapin @zackw
2017-11-05 11:42:59 +00:00
..
benches seperate and move miscellaneous benchmarks to librustc 2017-10-04 12:21:15 +00:00
fmt Rollup merge of #45081 - tamird:fmt-cleanup, r=alexcrichton 2017-10-08 13:39:03 +08:00
hash Implement Hash for raw pointers to unsized types 2017-10-25 11:07:13 -07:00
iter Optimize comparison functions of Iterator 2017-10-04 01:04:15 +08:00
num Auto merge of #44042 - LukasKalbertodt:ascii-methods-on-instrinsics, r=alexcrichton 2017-11-05 11:42:59 +00:00
ops Fix typo 2017-11-02 20:07:22 +08:00
prelude
slice De-stabilize core::slice::{from_ref, from_ref_mut}. 2017-11-01 22:21:29 +00:00
str Inline eq_slice into str::eq 2017-10-02 22:04:23 -03:00
sync since = "1.23.0" 2017-10-31 11:15:10 -08:00
tests Auto merge of #44764 - nvzqz:master, r=alexcrichton 2017-10-31 23:06:37 +00:00
any.rs
array.rs Pass formatter in TryFromSliceError Display impl 2017-09-29 11:26:19 -04:00
borrow.rs
Cargo.toml
cell.rs Bump to 1.23 and update bootstrap 2017-10-26 13:59:18 -07:00
char_private.rs
char.rs
clone.rs
cmp.rs Auto merge of #44943 - nivkner:fixme_fixup, r=dtolnay 2017-10-05 19:52:00 +00:00
convert.rs
default.rs
internal_macros.rs
intrinsics.rs Add link to stablized version of an intrinsic 2017-10-29 22:53:07 -04:00
iter_private.rs
lib.rs Bump to 1.23 and update bootstrap 2017-10-26 13:59:18 -07:00
macros.rs fix stringify docs 2017-10-22 13:14:17 -04:00
marker.rs auto trait future compatibility lint 2017-11-03 16:13:21 -02:00
mem.rs Bump to 1.23 and update bootstrap 2017-10-26 13:59:18 -07:00
nonzero.rs Bump to 1.23 and update bootstrap 2017-10-26 13:59:18 -07:00
option.rs Rename option::Missing to NoneError 2017-09-27 17:57:07 -04:00
panicking.rs
ptr.rs Fix references to zero_memory and copy_memory in ptr docs 2017-10-29 15:40:09 +01:00
raw.rs
result.rs core: derive Clone for result::IntoIter 2017-10-10 10:18:34 -07:00
tuple.rs