diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2015-10-23 02:17:03 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2015-10-23 02:17:03 +0300 |
| commit | bf2f1e512a94e34f40b729fe7347480d63dcab1b (patch) | |
| tree | 2b9b9b26cfd00c6797384bf197938ca99b017753 /src/libsyntax/parse | |
| parent | 7aec91734e0c12b8e36158566ad512a663111c9f (diff) | |
| download | rust-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')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 17 |
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; |
