Skip to content

Commit 27ede43

Browse files
committed
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.
2 parents b85033a + f82c984 commit 27ede43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libstd/path.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,10 @@ impl Path {
15821582

15831583
/// Returns a path that, when joined onto `base`, yields `self`.
15841584
///
1585+
/// # Errors
1586+
///
15851587
/// If `base` is not a prefix of `self` (i.e. `starts_with`
1586-
/// returns false), then `relative_from` returns `None`.
1588+
/// returns `false`), returns `Err`.
15871589
#[stable(since = "1.7.0", feature = "path_strip_prefix")]
15881590
pub fn strip_prefix<'a, P: ?Sized>(&'a self, base: &'a P)
15891591
-> Result<&'a Path, StripPrefixError>

0 commit comments

Comments
 (0)