mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
18 lines
288 B
Rust
18 lines
288 B
Rust
|
// run-pass
|
||
|
|
||
|
#![allow(dead_code)]
|
||
|
|
||
|
struct Foo {
|
||
|
foo: i32,
|
||
|
bar: (),
|
||
|
baz: (),
|
||
|
}
|
||
|
|
||
|
fn use_foo(x: Foo) -> i32 {
|
||
|
let Foo { foo, bar, .. } = x; //~ WARNING unused variable: `bar`
|
||
|
//~| help: try removing the field
|
||
|
return foo;
|
||
|
}
|
||
|
|
||
|
fn main() {}
|