mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
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.
This commit is contained in:
commit
27ede43c89
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user