File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -4420,11 +4420,7 @@ impl<'a> Parser<'a> {
4420
4420
p. forbid_lifetime ( ) ?;
4421
4421
let lo = p. span . lo ;
4422
4422
let ident = p. parse_ident ( ) ?;
4423
- let found_eq = p. eat ( & token:: Eq ) ;
4424
- if !found_eq {
4425
- let span = p. span ;
4426
- p. span_warn ( span, "whoops, no =?" ) ;
4427
- }
4423
+ p. expect ( & token:: Eq ) ?;
4428
4424
let ty = p. parse_ty ( ) ?;
4429
4425
let hi = ty. span . hi ;
4430
4426
let span = mk_sp ( lo, hi) ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // compile-flags: -Z parse-only -Z continue-parse-after-error
12
+
13
+ pub fn test < W , I : Iterator < Item =( ) , W > > ( ) {
14
+ //~^ ERROR expected `=`, found `>`
15
+ }
16
+
17
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments