Fix where clauses using fully qualified path syntax
This commit is contained in:
parent
e086cc8db5
commit
bd5a358910
5 changed files with 139 additions and 9 deletions
|
|
@ -96,6 +96,7 @@ pub(super) fn bounds_without_colon(p: &mut Parser) {
|
|||
// 'a: 'b + 'c,
|
||||
// T: Clone + Copy + 'static,
|
||||
// Iterator::Item: 'a,
|
||||
// <T as Iterator>::Item: 'a
|
||||
// {}
|
||||
pub(super) fn opt_where_clause(p: &mut Parser) {
|
||||
if !p.at(WHERE_KW) {
|
||||
|
|
@ -104,7 +105,11 @@ pub(super) fn opt_where_clause(p: &mut Parser) {
|
|||
let m = p.start();
|
||||
p.bump();
|
||||
loop {
|
||||
if !(paths::is_path_start(p) || p.current() == LIFETIME || p.current() == FOR_KW) {
|
||||
if !(paths::is_path_start(p)
|
||||
|| p.current() == LIFETIME
|
||||
|| p.current() == FOR_KW
|
||||
|| p.current() == L_ANGLE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
where_predicate(p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue