File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -1169,7 +1169,6 @@ impl FusedIterator for Ancestors<'_> {}
11691169/// path.push(r"..\otherdir");
11701170/// path.push("system32");
11711171///
1172- /// path.set_extension(r"\..\temp");
11731172#[ cfg_attr( not( test) , rustc_diagnostic_item = "PathBuf" ) ]
11741173#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11751174pub struct PathBuf {
@@ -1456,8 +1455,6 @@ impl PathBuf {
14561455 /// If the file stem contains internal dots and `extension` is empty, part
14571456 /// of the old file stem will be considered the new [`self.extension`].
14581457 ///
1459- /// The new `extension` is not sanitized, so may include separators.
1460- ///
14611458 /// See the examples below.
14621459 ///
14631460 /// [`self.file_name`]: Path::file_name
@@ -1487,9 +1484,6 @@ impl PathBuf {
14871484 ///
14881485 /// p.set_extension("");
14891486 /// assert_eq!(Path::new("/feel/the"), p.as_path());
1490- ///
1491- /// p.set_extension("/darkest.cookie");
1492- /// assert_eq!(Path::new("/feel/the./darkest.cookie"), p.as_path());
14931487 /// ```
14941488 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
14951489 pub fn set_extension < S : AsRef < OsStr > > ( & mut self , extension : S ) -> bool {
You can’t perform that action at this time.
0 commit comments