Rollup merge of #75289 - pickfire:patch-12, r=jonas-schievink

Remove ambiguity from PathBuf pop example
This commit is contained in:
Yuki Okushi 2020-08-09 06:41:33 +09:00 committed by GitHub
commit 3038ecb07b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1232,10 +1232,10 @@ impl PathBuf {
/// ```
/// use std::path::{Path, PathBuf};
///
/// let mut p = PathBuf::from("/test/test.rs");
/// let mut p = PathBuf::from("/spirited/away.rs");
///
/// p.pop();
/// assert_eq!(Path::new("/test"), p);
/// assert_eq!(Path::new("/spirited"), p);
/// p.pop();
/// assert_eq!(Path::new("/"), p);
/// ```