summaryrefslogtreecommitdiffstats
path: root/src/test/ui/object-lifetime/object-lifetime-default.rs
blob: 60b6629e694dbc1d53ff43b277f55dd975014ddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![feature(rustc_attrs)]

#[rustc_object_lifetime_default]
struct A<T>(T); //~ ERROR BaseDefault

#[rustc_object_lifetime_default]
struct B<'a,T>(&'a (), T); //~ ERROR BaseDefault

#[rustc_object_lifetime_default]
struct C<'a,T:'a>(&'a T); //~ ERROR 'a

#[rustc_object_lifetime_default]
struct D<'a,'b,T:'a+'b>(&'a T, &'b T); //~ ERROR Ambiguous

#[rustc_object_lifetime_default]
struct E<'a,'b:'a,T:'b>(&'a T, &'b T); //~ ERROR 'b

#[rustc_object_lifetime_default]
struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); //~ ERROR 'a,'b

#[rustc_object_lifetime_default]
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Ambiguous

fn main() { }