about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2015-10-23 02:17:03 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2015-10-23 02:17:03 +0300
commitbf2f1e512a94e34f40b729fe7347480d63dcab1b (patch)
tree2b9b9b26cfd00c6797384bf197938ca99b017753 /src/libsyntax/parse/parser.rs
parent7aec91734e0c12b8e36158566ad512a663111c9f (diff)
downloadrust-bf2f1e512a94e34f40b729fe7347480d63dcab1b.tar.gz
rust-bf2f1e512a94e34f40b729fe7347480d63dcab1b.zip
parser: fix erroneous comment
Qualified paths allow full path after the `>::`. For example

```rust
<T as Foo>::U::generic_method::<f64>()
```

The example is taken from `test/run-pass/associated-item-long-paths.rs`.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index d9f7ec67fe6..fcebe035961 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1595,8 +1595,21 @@ impl<'a> Parser<'a> {
         }
     }
 
-    // QUALIFIED PATH `<TYPE [as TRAIT_REF]>::IDENT[::<PARAMS>]`
-    // Assumes that the leading `<` has been parsed already.
+    /// Parses qualified path.
+    ///
+    /// Assumes that the leading `<` has been parsed already.
+    ///
+    /// Qualifed paths are a part of the universal function call
+    /// syntax (UFCS).
+    ///
+    /// `qualified_path = <type [as trait_ref]>::path`
+    ///
+    /// See `parse_path` for `mode` meaning.
+    ///
+    /// # Examples:
+    ///
+    /// `<T as U>::a`
+    /// `<T as U>::F::a::<S>`
     pub fn parse_qualified_path(&mut self, mode: PathParsingMode)
                                 -> PResult<(QSelf, ast::Path)> {
         let span = self.last_span;