diff options
| author | bors <bors@rust-lang.org> | 2016-12-24 00:22:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-24 00:22:00 +0000 |
| commit | 8d65c8d64edeadcfcc210fd70f44249d02daec41 (patch) | |
| tree | 53c2d86e1273b6912ed5c9c586abcd4f8010c8c0 /src/test | |
| parent | 4d07320d015ff762431a98cd058ea1fb70fd6c62 (diff) | |
| parent | 14e4b00933c13a4c419f2192df11b135d5bb0c85 (diff) | |
| download | rust-8d65c8d64edeadcfcc210fd70f44249d02daec41.tar.gz rust-8d65c8d64edeadcfcc210fd70f44249d02daec41.zip | |
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.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/parse-fail/where_with_bound.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/parse-fail/where_with_bound.rs b/src/test/parse-fail/where_with_bound.rs new file mode 100644 index 00000000000..cb57500df79 --- /dev/null +++ b/src/test/parse-fail/where_with_bound.rs @@ -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() {} |
