Skip to content

Deprecate the AsciiExt trait in favor of inherent methods - #49109

Merged
alexcrichton merged 1 commit into
rust-lang:masterfrom
SimonSapin:deprecate-asciiext
Mar 22, 2018
Merged

Deprecate the AsciiExt trait in favor of inherent methods#49109
alexcrichton merged 1 commit into
rust-lang:masterfrom
SimonSapin:deprecate-asciiext

Conversation

@SimonSapin

Copy link
Copy Markdown
Contributor

The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.

Fixes#39658

Comment threadsrc/libcore/tests/ascii.rs Outdated

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods are removed on str and [u8] in favor of explicit Iterator::all: #39658 (comment)

@SimonSapinSimonSapin added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 17, 2018
@CentrilCentril added the relnotes Marks issues that should be documented in the release notes of the next release. label Mar 18, 2018
@SimonSapinSimonSapin added the T-libs-api [DEPRECATED; DO NOT USE] label Mar 19, 2018
@alexcrichton

alexcrichton commented Mar 19, 2018

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Mar 19, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit dbc0c43 has been approved by alexcrichton

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2018
@kennytmkennytm mentioned this pull request Mar 21, 2018
@kennytm

Copy link
Copy Markdown
Member

@bors r-

Failed to build stage0-std on Windows.

error[E0624]: method `make_ascii_uppercase` is private
--> libstd\sys\windows\process.rs:47:13
|
47 | buf.make_ascii_uppercase();
| ^^^^^^^^^^^^^^^^^^^^

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 21, 2018
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.
Fixesrust-lang#39658
@SimonSapin

SimonSapin commented Mar 21, 2018

Copy link
Copy Markdown
ContributorAuthor

I had turned a trait impl into inherent methods, but forgot to make them public. Additional diff squashed into the commit just now:

diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs
index 175107bdc4..78b2bb5fe6 100644
--- a/src/libstd/sys_common/wtf8.rs+++ b/src/libstd/sys_common/wtf8.rs@@ -871,21 +871,21 @@ impl Hash for Wtf8 {
}
impl Wtf8 {
- fn is_ascii(&self) -> bool {+ pub fn is_ascii(&self) -> bool {
self.bytes.is_ascii()
}
- fn to_ascii_uppercase(&self) -> Wtf8Buf {+ pub fn to_ascii_uppercase(&self) -> Wtf8Buf {
Wtf8Buf { bytes: self.bytes.to_ascii_uppercase() }
}
- fn to_ascii_lowercase(&self) -> Wtf8Buf {+ pub fn to_ascii_lowercase(&self) -> Wtf8Buf {
Wtf8Buf { bytes: self.bytes.to_ascii_lowercase() }
}
- fn eq_ignore_ascii_case(&self, other: &Wtf8) -> bool {+ pub fn eq_ignore_ascii_case(&self, other: &Wtf8) -> bool {
self.bytes.eq_ignore_ascii_case(&other.bytes)
}
- fn make_ascii_uppercase(&mut self) { self.bytes.make_ascii_uppercase() }- fn make_ascii_lowercase(&mut self) { self.bytes.make_ascii_lowercase() }+ pub fn make_ascii_uppercase(&mut self) { self.bytes.make_ascii_uppercase() }+ pub fn make_ascii_lowercase(&mut self) { self.bytes.make_ascii_lowercase() }
}
#[cfg(test)]

@kennytmkennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 21, 2018
@SimonSapin

Copy link
Copy Markdown
ContributorAuthor

@bors: r=alexcrichton

@bors

bors commented Mar 21, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit c09b9f9 has been approved by alexcrichton

@bors

bors commented Mar 21, 2018

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 30, this pull request will be tested once the tree is reopened

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Mar 21, 2018
…excrichton
Deprecate the AsciiExt trait in favor of inherent methods
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.
Fixesrust-lang#39658
@kennytmkennytm mentioned this pull request Mar 22, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Mar 22, 2018
…excrichton
Deprecate the AsciiExt trait in favor of inherent methods
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.
Fixesrust-lang#39658
bors added a commit that referenced this pull request Mar 22, 2018
@alexcrichton
alexcrichton merged commit c09b9f9 into rust-lang:masterMar 22, 2018
@SimonSapin
SimonSapin deleted the deprecate-asciiext branch March 22, 2018 20:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@SimonSapin@alexcrichton@bors@kennytm@Centril