What does this program print?

from Pattern matching
Rust 1.98 beginner 2 min

What does this program print?

Rust
fn main() {
    let limit = 10;

    for value in [9, 10, 11] {
        let label = match value {
            n @ 0..=10 if n == limit => "limit",
            0..=10 => "inside",
            _ => "outside",
        };
        println!("{value}: {label}");
    }
}
Open in playground
Report an error