rust/src
bors 9f3998b4aa Auto merge of #77858 - ijackson:split-inclusive, r=KodrAus
Stabilize split_inclusive

### Contents of this MR

This stabilises:

 * `slice::split_inclusive`
 * `slice::split_inclusive_mut`
 * `str::split_inclusive`

Closes #72360.

### A possible concern

The proliferation of `split_*` methods is not particularly pretty.  The existence of `split_inclusive` seems to invite the addition of `rsplit_inclusive`, `splitn_inclusive`, etc.  We could instead have a more general API, along these kinds of lines maybe:
```
   pub fn split_generic('a,P,H>(&'a self, pat: P, how: H) -> ...
       where P: Pattern
       where H: SplitHow;

   pub fn split_generic_mut('a,P,H>(&'a mut self, pat: P, how: H) -> ...
       where P: Pattern
       where H: SplitHow;

   trait SplitHow {
       fn reverse(&self) -> bool;
       fn inclusive -> bool;
       fn limit(&self) -> Option<usize>;
   }

   pub struct SplitFwd;
   ...
   pub struct SplitRevInclN(pub usize);
```
But maybe that is worse.

### Let us defer that? ###

This seems like a can of worms.  I think we can defer opening it now; if and when we have something more general, these two methods can become convenience aliases.  But I thought I would mention it so the lang API team can consider it and have an opinion.
2021-01-13 07:38:58 +00:00
..
bootstrap Rollup merge of #79997 - coolreader18:wasm-reactor, r=alexcrichton 2021-01-12 07:58:59 +09:00
build_helper Fix even more URLs 2020-11-05 20:11:29 +01:00
ci Auto merge of #80435 - pietroalbini:compression-formats, r=Mark-Simulacrum 2020-12-31 00:23:13 +00:00
doc Fix typo in source-based-code-coverage.md 2021-01-10 22:17:51 +09:00
etc Detect invalid rustdoc test commands 2021-01-03 13:53:11 +01:00
librustdoc Auto merge of #77858 - ijackson:split-inclusive, r=KodrAus 2021-01-13 07:38:58 +00:00
llvm-project@f9a8d70b6e Update to LLVM 11.0.1 2021-01-07 11:32:10 -08:00
test Rollup merge of #80924 - teryror:issue-80893-fix, r=jyn514 2021-01-13 03:20:25 +01:00
tools Separate out a hir::Impl struct 2021-01-12 20:32:33 -05:00
README.md Update README.md 2020-08-30 13:40:11 -05:00
stage0.txt Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
version Bump version to 1.51 2020-12-25 10:42:53 -05:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.