1
Fork 0

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`.
This commit is contained in:
Aleksey Kladov 2015-10-23 02:17:03 +03:00
parent 7aec91734e
commit bf2f1e512a

View file

@ -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;