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

11 lines
198 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 mismatched types: expected `ast/&` but found `ast/&a`
2012-04-21 12:04:58 -05:00
}
fn main() {
}