diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-10-01 11:55:46 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-10-01 11:55:46 +0000 |
| commit | 6c1b447f2e67f5eae89394344ade698aca3ec7e6 (patch) | |
| tree | ce37bd636efc867ab133b5c78c7da745da2939ba /src/liballoc/str.rs | |
| parent | d16ee891c63e2441ba97072a83fa79b0b6e6e01a (diff) | |
| download | rust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.tar.gz rust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.zip | |
Remove unneeded `fn main` blocks from docs
Diffstat (limited to 'src/liballoc/str.rs')
| -rw-r--r-- | src/liballoc/str.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index 9a1342c30d5..9231c2d3f1d 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -500,10 +500,8 @@ impl str { /// A panic upon overflow: /// /// ```should_panic - /// fn main() { - /// // this will panic at runtime - /// "0123456789abcdef".repeat(usize::max_value()); - /// } + /// // this will panic at runtime + /// "0123456789abcdef".repeat(usize::max_value()); /// ``` #[stable(feature = "repeat_str", since = "1.16.0")] pub fn repeat(&self, n: usize) -> String { |
