2015-02-17 11:50:08 +00:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
2015-02-11 21:37:36 +00:00
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct A<
|
|
|
|
T, //~ ERROR BaseDefault
|
|
|
|
>(T);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct B<
|
|
|
|
'a,
|
|
|
|
T, //~ ERROR BaseDefault
|
|
|
|
>(&'a (), T);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct C<
|
|
|
|
'a,
|
|
|
|
T: 'a, //~ ERROR 'a
|
|
|
|
>(&'a T);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct D<
|
|
|
|
'a,
|
|
|
|
'b,
|
|
|
|
T: 'a + 'b, //~ ERROR Ambiguous
|
|
|
|
>(&'a T, &'b T);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct E<
|
|
|
|
'a,
|
|
|
|
'b: 'a,
|
|
|
|
T: 'b, //~ ERROR 'b
|
|
|
|
>(&'a T, &'b T);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct F<
|
|
|
|
'a,
|
|
|
|
'b,
|
|
|
|
T: 'a, //~ ERROR 'a
|
|
|
|
U: 'b, //~ ERROR 'b
|
|
|
|
>(&'a T, &'b U);
|
2015-02-11 21:37:36 +00:00
|
|
|
|
|
|
|
#[rustc_object_lifetime_default]
|
2022-08-30 20:47:58 +00:00
|
|
|
struct G<
|
|
|
|
'a,
|
|
|
|
'b,
|
|
|
|
T: 'a, //~ ERROR 'a
|
|
|
|
U: 'a + 'b, //~ ERROR Ambiguous
|
|
|
|
>(&'a T, &'b U);
|
|
|
|
|
|
|
|
fn main() {}
|