about summary refs log tree commit diff
diff options
context:
space:
mode:
-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>