We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68f8c54 commit 4ee11f4Copy full SHA for 4ee11f4
src/libstd/path.rs
@@ -1240,12 +1240,13 @@ impl Path {
1240
/// use std::path::Path;
1241
///
1242
/// Path::new("foo.txt");
1243
+ /// ```
1244
+ ///
1245
+ /// You can create `Path`s from `String`s, or even other `Path`s:
1246
- /// // Strings work too:
1247
1248
/// let s = String::from("bar.txt");
1249
/// let p = Path::new(&s);
- ///
- /// // As do other `Path`s:
1250
/// Path::new(&p);
1251
/// ```
1252
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments