-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language team
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.
Metadata
Metadata
Assignees
Labels
P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language team