Skip to content

Commit 1c29670

Browse files
authored
Unrolled build for rust-lang#133602
Rollup merge of rust-lang#133602 - SanchithHegde:fix-pathbuf-example-codeblocks, r=cuviper fix: fix codeblocks in `PathBuf` example This PR adds missing codeblocks around an example included in the `PathBuf` documentation.
2 parents 8ac313b + d599d5a commit 1c29670

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/path.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ impl FusedIterator for Ancestors<'_> {}
11581158
/// Note that `PathBuf` does not always sanitize arguments, for example
11591159
/// [`push`] allows paths built from strings which include separators:
11601160
///
1161+
/// ```
11611162
/// use std::path::PathBuf;
11621163
///
11631164
/// let mut path = PathBuf::new();
@@ -1166,6 +1167,7 @@ impl FusedIterator for Ancestors<'_> {}
11661167
/// path.push("windows");
11671168
/// path.push(r"..\otherdir");
11681169
/// path.push("system32");
1170+
/// ```
11691171
///
11701172
/// The behavior of `PathBuf` may be changed to a panic on such inputs
11711173
/// in the future. [`Extend::extend`] should be used to add multi-part paths.

0 commit comments

Comments
 (0)