summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-10-01 11:55:46 +0000
committerLzu Tao <taolzu@gmail.com>2019-10-01 11:55:46 +0000
commit6c1b447f2e67f5eae89394344ade698aca3ec7e6 (patch)
treece37bd636efc867ab133b5c78c7da745da2939ba /src/liballoc/string.rs
parentd16ee891c63e2441ba97072a83fa79b0b6e6e01a (diff)
downloadrust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.tar.gz
rust-6c1b447f2e67f5eae89394344ade698aca3ec7e6.zip
Remove unneeded `fn main` blocks from docs
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