rust/src/test/compile-fail/regions-creating-enums3.rs
2012-07-13 10:20:51 -07:00

11 lines
199 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 mismatched types: expected `&a/ast/&a` but found `&b/ast/&b`
}
fn main() {
}