You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
369 B

// ANCHOR: def
enum IpAddrKind {
V4,
V6,
}
// ANCHOR_END: def
fn main() {
// ANCHOR: instance
let four = IpAddrKind::V4;
let six = IpAddrKind::V6;
// ANCHOR_END: instance
// ANCHOR: fn_call
route(IpAddrKind::V4);
route(IpAddrKind::V6);
// ANCHOR_END: fn_call
}
// ANCHOR: fn
fn route(ip_kind: IpAddrKind) {}
// ANCHOR_END: fn