about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index cc628fe0f0c..86e09b7be2d 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -1828,6 +1828,12 @@ impl<'a> Extend<Cow<'a, str>> for String {
 }
 
 /// A convenience impl that delegates to the impl for `&str`.
+///
+/// # Examples
+///
+/// ```
+/// assert_eq!(String::from("Hello world").find("world"), Some(6));
+/// ```
 #[unstable(
     feature = "pattern",
     reason = "API not fully fleshed out and ready to be stabilized",