about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSunjay Varma <varma.sunjay@gmail.com>2017-11-25 14:42:55 -0500
committerSunjay Varma <varma.sunjay@gmail.com>2017-12-01 01:26:29 -0500
commit38c2a730170f94dfb458208c36be154ab5412ec7 (patch)
tree940f86ef20c6bcc908bdd43b098758f3503b5d23 /src/libsyntax/parse/parser.rs
parent1c023b3cec1808a4877cdda7b4d1459fc760aef3 (diff)
downloadrust-38c2a730170f94dfb458208c36be154ab5412ec7.tar.gz
rust-38c2a730170f94dfb458208c36be154ab5412ec7.zip
Testing and fixes
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5a20c7f40e6..2a80c0a05bf 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1295,7 +1295,6 @@ impl<'a> Parser<'a> {
         let (name, node, generics) = if self.eat_keyword(keywords::Type) {
             let (generics, TyParam {ident, bounds, default, ..}) =
                 self.parse_trait_item_assoc_ty(vec![])?;
-            self.expect(&token::Semi)?;
             (ident, TraitItemKind::Type(bounds, default), generics)
         } else if self.is_const_item() {
             self.expect_keyword(keywords::Const)?;
@@ -4464,6 +4463,7 @@ impl<'a> Parser<'a> {
         } else {
             None
         };
+        self.expect(&token::Semi)?;
 
         Ok((generics, TyParam {
             attrs: preceding_attrs.into(),