about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-24 09:21:06 +0000
committerbors <bors@rust-lang.org>2021-03-24 09:21:06 +0000
commit680d9fcac1dec4b671707e0ffc6bf95ac7115ebe (patch)
tree46e122ca8c8a073c57447c73bb95def1b36114a8
parent5b33de3340c7b36646af46303a30f7066b4bd7db (diff)
parent633a66fb66f5c9c433c58f4aa1da85eefe813fa5 (diff)
Auto merge of #83408 - ijackson:expose-splitinclusive, r=dtolnay
Expose str::SplitInclusive in alloc and therefore in std

This seems to have been omitted from the beginning when this feature was first introduced in 86bf96291d82.  Most users won't need to name this type which is probably why this wasn't noticed in the meantime.

See #83372 for a different but related bug.

### Notes for reviewers

I think I have got this right but TBH I am not very familiar with the relationship between core and std and so on.  <strike>I also haven't don't any kind of test (not even a build) yet.  I will do a local docs build to see that the type now appears in the std docs.</strike>  I did a local docs build and it has made this type appear as `std::str::SplitInclusive` as expected

The linkification of the return value from `str::split_inclusive` teleports me to the online url for `core::str::SplitInclusive`.  I think this may be a rustdoc anomaly (similar to #79630 maybe) but I am not sure.  Perhaps it means I haven't done the `std` -> `core` referrence correctly.

I made this insta-stable since it seems like simply a bug.  Please LMK if that is not right.  *(edited to add:)* In particular, IDK how this ought to relate to the (?)current release process.
-rw-r--r--library/alloc/src/str.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index 8c64bc08012..3730b407972 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -46,6 +46,8 @@ pub use core::str::pattern;
 pub use core::str::EncodeUtf16;
 #[stable(feature = "split_ascii_whitespace", since = "1.34.0")]
 pub use core::str::SplitAsciiWhitespace;
+#[stable(feature = "split_inclusive", since = "1.53.0")]
+pub use core::str::SplitInclusive;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::str::SplitWhitespace;
 #[stable(feature = "rust1", since = "1.0.0")]