commit | 1b210d1774f3f102f35fdb86c840618be55b5e5d | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sat Oct 27 22:07:00 2018 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sat Oct 27 22:07:00 2018 -0700 |
tree | 5a3d19cc581e5e6d83f0287c043d20919c8eb6d8 | |
parent | 5cd40fca872a445ddd455f7d891970d607a29220 [diff] |
Allow trailing plus in trait object types
diff --git a/src/ty.rs b/src/ty.rs index 49be3d3..da94978 100644 --- a/src/ty.rs +++ b/src/ty.rs
@@ -418,6 +418,9 @@ if allow_plus { while input.peek(Token![+]) { bounds.push_punct(input.parse()?); + if input.peek(Token![>]) { + break; + } bounds.push_value(input.parse()?); } } @@ -660,6 +663,9 @@ break; } bounds.push_punct(input.parse()?); + if input.peek(Token![>]) { + break; + } } } else { bounds.push_value(input.parse()?);