511e7626ae
A similar approach could be used for type parameters. Fixes #2282.
12 lines
176 B
Rust
12 lines
176 B
Rust
enum ast {
|
|
num(uint),
|
|
add(&ast, &ast)
|
|
}
|
|
|
|
fn mk_add_bad1(x: &a/ast, y: &b/ast) -> ast/&a {
|
|
add(x, y) //~ ERROR cannot infer an appropriate lifetime
|
|
}
|
|
|
|
fn main() {
|
|
}
|