diff options
| author | bors <bors@rust-lang.org> | 2019-10-01 22:04:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-01 22:04:23 +0000 |
| commit | 7130fc54e05e247f93c7ecc2d10f56b314c97831 (patch) | |
| tree | 978f8c357723da483f92ac6791f82f5f55172f74 /src/liballoc/slice.rs | |
| parent | 702b45e409495a41afcccbe87a251a692b0cefab (diff) | |
| parent | adc0dc5871ac49543ae94827e7c4d411756e3d47 (diff) | |
| download | rust-7130fc54e05e247f93c7ecc2d10f56b314c97831.tar.gz rust-7130fc54e05e247f93c7ecc2d10f56b314c97831.zip | |
Auto merge of #64972 - Centril:rollup-gcawast, r=Centril
Rollup of 7 pull requests
Successful merges:
- #63416 (apfloat: improve doc comments)
- #64820 (BTreeSet intersection, is_subset & difference optimizations)
- #64910 (syntax: cleanup param, method, and misc parsing)
- #64912 (Remove unneeded `fn main` blocks from docs)
- #64933 (Fixes #64919. Suggest fix based on operator precendence.)
- #64943 (Add lower bound doctests for `saturating_{add,sub}` signed ints)
- #64950 (Simplify interners)
Failed merges:
r? @ghost
Diffstat (limited to 'src/liballoc/slice.rs')
| -rw-r--r-- | src/liballoc/slice.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 881d499c074..4e4a285c21d 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -412,20 +412,15 @@ impl<T> [T] { /// /// ``` /// #![feature(repeat_generic_slice)] - /// - /// fn main() { - /// assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]); - /// } + /// assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]); /// ``` /// /// A panic upon overflow: /// /// ```should_panic /// #![feature(repeat_generic_slice)] - /// fn main() { - /// // this will panic at runtime - /// b"0123456789abcdef".repeat(usize::max_value()); - /// } + /// // this will panic at runtime + /// b"0123456789abcdef".repeat(usize::max_value()); /// ``` #[unstable(feature = "repeat_generic_slice", reason = "it's on str, why not on slice?", |
