Fix where clauses parsing
Don't allow lifetimes without any bounds at all
This commit is contained in:
parent
a41505f4f4
commit
cf9ff2b59b
3 changed files with 7 additions and 4 deletions
|
|
@ -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, _: &T) -> bool where {
|
||||
//~^ ERROR a `where` clause must have at least one predicate in it
|
||||
|
|
@ -20,5 +20,8 @@ fn equal2<T>(_: &T, _: &T) -> bool where T: {
|
|||
true
|
||||
}
|
||||
|
||||
fn foo<'a>() where 'a {}
|
||||
//~^ ERROR expected `:`, found `{`
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue