rust/src/test/compile-fail/regions-creating-enums4.rs

13 lines
192 B
Rust
Raw Normal View History

enum ast {
2012-04-21 12:04:58 -05:00
num(uint),
add(&ast, &ast)
}
fn mk_add_bad2(x: &a/ast, y: &a/ast, z: &ast) -> ast {
add(x, y)
//~^ ERROR cannot infer an appropriate lifetime
2012-04-21 12:04:58 -05:00
}
fn main() {
}