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

Tweak some stabilizations in libstd #50088

Merged
merged 1 commit into from
Apr 20, 2018
Merged

Conversation

alexcrichton
Copy link
Member

This commit tweaks a few stable APIs in the beta branch before they hit
stable. The str::is_whitespace and str::is_alphanumeric functions were
deleted (added in #49381, issue at #49657). The and_modify APIs added
in #44734 were altered to take a FnOnce closure rather than a FnMut closure.

Closes #49581
Closes #49657

@alexcrichton
Copy link
Member Author

r? @sfackler

@alexcrichton alexcrichton added beta-nominated Nominated for backporting to the compiler in the beta channel. beta-accepted Accepted for backporting to the compiler in the beta channel. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Apr 19, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:32:41]    Compiling bitflags v0.9.1
[00:32:44]    Compiling rand v0.4.2
[00:32:49]    Compiling tempdir v0.3.7
[00:32:49]    Compiling rustdoc v0.0.0 (file:///checkout/src/librustdoc)
[00:33:04] error[E0599]: no method named `is_whitespace` found for type `&str` in the current scope
[00:33:04]     |
[00:33:04]     |
[00:33:04] 440 |         let header = trimline.is_whitespace() ||
[00:33:04]     |
[00:33:04]     |
[00:33:04]     = help: items from traits can only be used if the trait is in scope
[00:33:04]     = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:33:04]             candidate #1: `use core::str::StrExt;`
[00:33:04]     = help: did you mean `split_whitespace`?
[00:33:04] error: aborting due to previous error
[00:33:04] 
[00:33:04] For more information about this error, try `rustc --explain E0599`.
[00:33:04] error: Could not compile `rustdoc`.
---
[00:33:04] 
[00:33:04] 
[00:33:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:33:04] Build completed unsuccessfully in 0:28:30
[00:33:04] make: *** [all] Error 1
[00:33:04] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1397eb12
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

This commit tweaks a few stable APIs in the `beta` branch before they hit
stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were
deleted (added in rust-lang#49381, issue at rust-lang#49657). The `and_modify` APIs added
in rust-lang#44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure.

Closes rust-lang#49581
Closes rust-lang#49657
/// ```
#[stable(feature = "unicode_methods_on_intrinsics", since = "1.27.0")]
#[inline]
pub fn is_whitespace(&self) -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

Should we be destabilizing and deprecating these for a bit? Not sure if they've been around and unstable previously.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be ok with that as well yeah, or perhaps just reverting these to unstable? I'm fine either way, they were added insta-stable in #49381 and haven't been around for all that long so I don't think we need too too much process

Copy link
Member

Choose a reason for hiding this comment

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

Oh cool if they're new then it seems fine to just remove.

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2018
@sfackler
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 20, 2018

📌 Commit ca79ba3 has been approved by sfackler

@bors bors 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 Apr 20, 2018
@alexcrichton
Copy link
Member Author

@bors: p=1

(as this is beta-nominated)

@bors
Copy link
Contributor

bors commented Apr 20, 2018

⌛ Testing commit ca79ba3 with merge a10bb6b...

bors added a commit that referenced this pull request Apr 20, 2018
Tweak some stabilizations in libstd

This commit tweaks a few stable APIs in the `beta` branch before they hit
stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were
deleted (added in #49381, issue at #49657). The `and_modify` APIs added
in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure.

Closes #49581
Closes #49657
@bors
Copy link
Contributor

bors commented Apr 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: sfackler
Pushing a10bb6b to master...

@bors bors merged commit ca79ba3 into rust-lang:master Apr 20, 2018
@alexcrichton alexcrichton deleted the std-tweaks branch April 21, 2018 02:45
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 21, 2018
bors added a commit that referenced this pull request Apr 21, 2018
[beta] Tweak some stabilizations in libstd

This is a backport of #50088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants