]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/where-lifetime-resolution.rs
New upstream version 1.29.0+dfsg1
[rustc.git] / src / test / compile-fail / where-lifetime-resolution.rs
CommitLineData
32a655c1 1// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
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
ff7c6d11
XL
11trait Trait1<'a> {}
12trait Trait2<'a, 'b> {}
c34b1796 13
32a655c1
SL
14fn f() where
15 for<'a> Trait1<'a>: Trait1<'a>, // OK
16 (for<'a> Trait1<'a>): Trait1<'a>,
17 //~^ ERROR use of undeclared lifetime name `'a`
18 for<'a> for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
19 //~^ ERROR use of undeclared lifetime name `'b`
20 //~| ERROR nested quantification of lifetimes
21{}
c1a9b12d
SL
22
23fn main() {}