From 98d991fac531d9a437a697dc7ad29967c978a3d3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 2 May 2016 15:09:36 +0200 Subject: parser: change warning into an error on `T` Fixes: #32214 --- src/libsyntax/parse/parser.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 671a11b57de..e5780c70608 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4420,11 +4420,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); -- cgit 1.4.1-3-g733a5