We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e178495 commit ba4d55dCopy full SHA for ba4d55d
src/libstd/path.rs
@@ -1248,12 +1248,13 @@ impl Path {
1248
/// use std::path::Path;
1249
///
1250
/// Path::new("foo.txt");
1251
+ /// ```
1252
+ ///
1253
+ /// You can create `Path`s from `String`s, or even other `Path`s:
1254
- /// // Strings work too:
1255
1256
/// let s = String::from("bar.txt");
1257
/// let p = Path::new(&s);
- ///
- /// // As do other `Path`s:
1258
/// Path::new(&p);
1259
/// ```
1260
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments