From cf9ff2b59bf876650b1e13ab66078bfd22ac85ef Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Oct 2016 18:21:27 +0300 Subject: Fix where clauses parsing Don't allow lifetimes without any bounds at all --- src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs b/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs index 3ac71176342..78d97454087 100644 --- a/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs +++ b/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// 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. // @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags: -Z parse-only +// compile-flags: -Z parse-only -Z continue-parse-after-error fn equal1(_: &T, _: &T) -> bool where { //~^ ERROR a `where` clause must have at least one predicate in it @@ -20,5 +20,8 @@ fn equal2(_: &T, _: &T) -> bool where T: { true } +fn foo<'a>() where 'a {} +//~^ ERROR expected `:`, found `{` + fn main() { } -- cgit 1.4.1-3-g733a5