Closed
Description
Example:
struct Foo<T> {
value: T
}
const F: Foo<int> = Foo { value: 2 };
fn main() {
let x = Foo { value: 2 };
match x {
F => { println!("Hi"); }
_ => { println!("Ho"); }
}
}
I feel pretty sure that we would want matching to use a PartialEq
impl. For now constant patterns should be limited to uint/int/&str. I'll throw it into a patch I'm working on.