-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It's convenient to use underscores in match arms to both concisely capture the remaining arms, as well as to avoid naming variables that won't be used. For example, the following match statement should be supported for options:
#[define]
fn is_some<T>(v: Option<T>) -> bool {
match v {
Option::Some(_) => true,
_ => false,
}Underscores are used both in place of variables that don't matter (Some(_)) as well as to capture remaining match arms (_ => false).
Metadata
Metadata
Assignees
Labels
No labels