2018-12-16 21:21:47 -06:00
|
|
|
enum Ast<'a> {
|
|
|
|
Num(usize),
|
|
|
|
Add(&'a Ast<'a>, &'a Ast<'a>)
|
2012-04-21 12:04:58 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
fn mk_add_bad1<'a,'b>(x: &'a Ast<'a>, y: &'b Ast<'b>) -> Ast<'a> {
|
2022-04-19 05:56:18 -05:00
|
|
|
Ast::Add(x, y)
|
2022-04-01 12:13:25 -05:00
|
|
|
//~^ ERROR lifetime may not live long enough
|
2012-04-21 12:04:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-08-13 17:06:13 -05:00
|
|
|
}
|