如何忽略模式匹配中类似结构的枚举变体的成员?

amp*_*ron 8 enums rust

如何unused_variables从以下代码中删除警告?

pub enum Foo {
    Bar {
        a: i32,
        b: i32,
        c: i32,
    },
    Baz,
}

fn main() {
    let myfoo = Foo::Bar { a: 1, b: 2, c: 3 };
    let x: i32 = match myfoo {
        Foo::Bar { a, b, c } => b * b,
        Foo::Baz => -1,
    };
    assert_eq!(x, 4);
}
Run Code Online (Sandbox Code Playgroud)

我知道我可以在某一点之后忽略struct成员:

Foo::Bar { a, .. } => // do stuff with 'a'
Run Code Online (Sandbox Code Playgroud)

但我无法在任何地方找到解释如何忽略单个struct成员的文档.

关于Rust Playground的代码

She*_*ter 11

我知道我可以在某一点之后忽略struct成员:

..不是位置的.它只是意味着"所有其他领域":

Foo::Bar { b, .. } => b * b,
Run Code Online (Sandbox Code Playgroud)