From f300fafccd4c6e1c83753dc283975ccda086ba1f Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 25 Jun 2016 10:05:01 -0400 Subject: [PATCH] Indicate how the `std::path::Components` struct is created. --- src/libstd/path.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index f413bed86a853..afcb75ed22ed9 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -579,6 +579,8 @@ impl<'a> AsRef for Component<'a> { /// See the module documentation for an in-depth explanation of components and /// their role in the API. /// +/// This `struct` is created by the [`path::Path::components`] method. +/// /// # Examples /// /// ``` @@ -590,6 +592,8 @@ impl<'a> AsRef for Component<'a> { /// println!("{:?}", component); /// } /// ``` +/// +/// [`path::Path::components`]: struct.Path.html#method.components #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Components<'a> {