about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-05-03 19:09:08 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-05-03 19:54:55 +0530
commit51a3a8f5230e6c77b4ecea397742fcf51ff5b749 (patch)
tree34be84c4cee50019376c004b91f340e2546f277f /src/libsyntax
parent52c97f237b7cf79889136569cec014f0fdd4af98 (diff)
parent98d991fac531d9a437a697dc7ad29967c978a3d3 (diff)
downloadrust-51a3a8f5230e6c77b4ecea397742fcf51ff5b749.tar.gz
rust-51a3a8f5230e6c77b4ecea397742fcf51ff5b749.zip
Rollup merge of #33343 - birkenfeld:issue-32214, r=Manishearth
parser: change warning into an error on `T<A=B, C>`

part of #32214

This seems to be the obvious fix, and the error message is consistent with all the other parser errors ("expected x, found y").
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index b9188f5101d..9cd2e6ef7d6 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4419,11 +4419,7 @@ impl<'a> Parser<'a> {
                 p.forbid_lifetime()?;
                 let lo = p.span.lo;
                 let ident = p.parse_ident()?;
-                let found_eq = p.eat(&token::Eq);
-                if !found_eq {
-                    let span = p.span;
-                    p.span_warn(span, "whoops, no =?");
-                }
+                p.expect(&token::Eq)?;
                 let ty = p.parse_ty()?;
                 let hi = ty.span.hi;
                 let span = mk_sp(lo, hi);