blob: c9eab08cbe9e21899566f85133af4226f1533865 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
enum Ast<'a> {
Num(usize),
Add(&'a Ast<'a>, &'a Ast<'a>)
}
fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
Ast::Add(x, y)
//~^ ERROR lifetime may not live long enough
}
fn main() {
}
|