Auto merge of #38268 - withoutboats:parse_where_higher_rank_hack, r=eddyb

Prevent where < ident > from parsing.

In order to be forward compatible with `where<'a>` syntax for higher
rank parameters, prevent potential conflicts with UFCS from parsing
correctly for the near term.
This commit is contained in:
bors 2016-12-24 00:22:00 +00:00
commit 8d65c8d64e
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,16 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: -Z parse-only
fn foo<T>() where <T>::Item: ToString, T: Iterator { }
//~^ syntax `where<T>` is reserved for future use
fn main() {}