@@ -135,12 +135,12 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
135135/// get_path_prefix(r"\\?\pictures\kittens"));
136136/// assert_eq!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")),
137137/// get_path_prefix(r"\\?\UNC\server\share"));
138- /// assert_eq!(VerbatimDisk('C' as u8 ), get_path_prefix(r"\\?\c:\"));
138+ /// assert_eq!(VerbatimDisk(b 'C'), get_path_prefix(r"\\?\c:\"));
139139/// assert_eq!(DeviceNS(OsStr::new("BrainInterface")),
140140/// get_path_prefix(r"\\.\BrainInterface"));
141141/// assert_eq!(UNC(OsStr::new("server"), OsStr::new("share")),
142142/// get_path_prefix(r"\\server\share"));
143- /// assert_eq!(Disk('C' as u8 ), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
143+ /// assert_eq!(Disk(b 'C'), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
144144/// # }
145145/// ```
146146#[ derive( Copy , Clone , Debug , Hash , PartialOrd , Ord , PartialEq , Eq ) ]
@@ -235,10 +235,10 @@ impl<'a> Prefix<'a> {
235235 ///
236236 /// assert!(Verbatim(OsStr::new("pictures")).is_verbatim());
237237 /// assert!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
238- /// assert!(VerbatimDisk('C' as u8 ).is_verbatim());
238+ /// assert!(VerbatimDisk(b 'C').is_verbatim());
239239 /// assert!(!DeviceNS(OsStr::new("BrainInterface")).is_verbatim());
240240 /// assert!(!UNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
241- /// assert!(!Disk('C' as u8 ).is_verbatim());
241+ /// assert!(!Disk(b 'C').is_verbatim());
242242 /// ```
243243 #[ inline]
244244 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -401,7 +401,7 @@ enum State {
401401/// let path = Path::new(r"c:\you\later\");
402402/// match path.components().next().unwrap() {
403403/// Component::Prefix(prefix_component) => {
404- /// assert_eq!(Prefix::Disk('C' as u8 ), prefix_component.kind());
404+ /// assert_eq!(Prefix::Disk(b 'C'), prefix_component.kind());
405405/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
406406/// }
407407/// _ => unreachable!(),
@@ -1040,7 +1040,7 @@ impl<'a> cmp::Ord for Components<'a> {
10401040/// [`Deref`]: ../ops/trait.Deref.html
10411041///
10421042/// More details about the overall approach can be found in
1043- /// the module documentation.
1043+ /// the [ module documentation](index.html) .
10441044///
10451045/// # Examples
10461046///
@@ -1186,7 +1186,7 @@ impl PathBuf {
11861186 self . inner . push ( path) ;
11871187 }
11881188
1189- /// Truncate `self` to [`self.parent`].
1189+ /// Truncates `self` to [`self.parent`].
11901190 ///
11911191 /// Returns `false` and does nothing if [`self.file_name`] is [`None`].
11921192 /// Otherwise, returns `true`.
@@ -1512,7 +1512,7 @@ impl AsRef<OsStr> for PathBuf {
15121512/// [`PathBuf`]: struct.PathBuf.html
15131513///
15141514/// More details about the overall approach can be found in
1515- /// the module documentation.
1515+ /// the [ module documentation](index.html) .
15161516///
15171517/// # Examples
15181518///
@@ -1689,7 +1689,7 @@ impl Path {
16891689 self . has_root ( ) && ( cfg ! ( unix) || cfg ! ( target_os = "redox" ) || self . prefix ( ) . is_some ( ) )
16901690 }
16911691
1692- /// Return `false ` if the `Path` is relative, i.e. not absolute.
1692+ /// Returns `true ` if the `Path` is relative, i.e. not absolute.
16931693 ///
16941694 /// See [`is_absolute`]'s documentation for more details.
16951695 ///
@@ -2019,7 +2019,7 @@ impl Path {
20192019 /// * Repeated separators are ignored, so `a/b` and `a//b` both have
20202020 /// `a` and `b` as components.
20212021 ///
2022- /// * Occurentces of `.` are normalized away, exept if they are at the
2022+ /// * Occurences of `.` are normalized away, except if they are at the
20232023 /// beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
20242024 /// `a/b` all have `a` and `b` as components, but `./a/b` starts with
20252025 /// an additional [`CurDir`] component.
0 commit comments