mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
fix: fix codeblocks in PathBuf
example
This commit is contained in:
parent
a2545fd6fc
commit
d599d5a381
@ -1158,6 +1158,7 @@ impl FusedIterator for Ancestors<'_> {}
|
||||
/// Note that `PathBuf` does not always sanitize arguments, for example
|
||||
/// [`push`] allows paths built from strings which include separators:
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::PathBuf;
|
||||
///
|
||||
/// let mut path = PathBuf::new();
|
||||
@ -1166,6 +1167,7 @@ impl FusedIterator for Ancestors<'_> {}
|
||||
/// path.push("windows");
|
||||
/// path.push(r"..\otherdir");
|
||||
/// path.push("system32");
|
||||
/// ```
|
||||
///
|
||||
/// The behavior of `PathBuf` may be changed to a panic on such inputs
|
||||
/// in the future. [`Extend::extend`] should be used to add multi-part paths.
|
||||
|
Loading…
Reference in New Issue
Block a user