about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-01 23:56:23 +0200
committerGitHub <noreply@github.com>2019-10-01 23:56:23 +0200
commit7628cada4f56676c361730251841e65600d863fe (patch)
tree1bc24a00dc687139d6c6c2b2df1d155e2294a1fd /src/liballoc/string.rs
parentdb9689333a2b52af4dffde750e7055cf6badb576 (diff)
parent6c1b447f2e67f5eae89394344ade698aca3ec7e6 (diff)
downloadrust-7628cada4f56676c361730251841e65600d863fe.tar.gz
rust-7628cada4f56676c361730251841e65600d863fe.zip
Rollup merge of #64912 - lzutao:unneeded-main-doc, r=jonas-schievink
Remove unneeded `fn main` blocks from docs

## [No whitespace diff](https://github.com/rust-lang/rust/pull/64912/files?w=1)
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index abe50fdb7a3..639124e26cc 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -164,10 +164,8 @@ use crate::vec::Vec;
 ///
 /// fn example_func<A: TraitExample>(example_arg: A) {}
 ///
-/// fn main() {
-///     let example_string = String::from("example_string");
-///     example_func(&example_string);
-/// }
+/// let example_string = String::from("example_string");
+/// example_func(&example_string);
 /// ```
 ///
 /// There are two options that would work instead. The first would be to