about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-02-17 18:14:36 -0500
committerSteve Klabnik <steve@steveklabnik.com>2016-02-17 18:14:36 -0500
commit27ede43c896fc7343975b8ecd67d208ea6673d53 (patch)
treeb9b5dcff2122274ba859e76ba860b082d72b64ba /src/libstd
parentb85033a7eb05b191e5b361f1a234f8db9fc446e4 (diff)
parentf82c984764c6f97dccac6a78b421954a64f3e6e0 (diff)
downloadrust-27ede43c896fc7343975b8ecd67d208ea6673d53.tar.gz
rust-27ede43c896fc7343975b8ecd67d208ea6673d53.zip
Rollup merge of #31733 - gkoz:strip_prefix_docs, r=alexcrichton
It wasn't fixed after copy-pasting. This probably needs to be backported to beta.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 10ecaed3aef..3798fb76ad6 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1582,8 +1582,10 @@ impl Path {
 
     /// Returns a path that, when joined onto `base`, yields `self`.
     ///
+    /// # Errors
+    ///
     /// If `base` is not a prefix of `self` (i.e. `starts_with`
-    /// returns false), then `relative_from` returns `None`.
+    /// returns `false`), returns `Err`.
     #[stable(since = "1.7.0", feature = "path_strip_prefix")]
     pub fn strip_prefix<'a, P: ?Sized>(&'a self, base: &'a P)
                                        -> Result<&'a Path, StripPrefixError>