2021-06-27 01:22:46 -05:00
|
|
|
// edition:2021
|
|
|
|
// check-pass
|
2021-02-23 16:55:36 -06:00
|
|
|
#![warn(unused)]
|
2021-02-21 09:20:40 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let t = (String::from("Hello"), String::from("World"));
|
|
|
|
let g = (String::from("Mr"), String::from("Goose"));
|
|
|
|
|
2021-02-23 16:55:36 -06:00
|
|
|
let a = || {
|
2021-02-21 09:20:40 -06:00
|
|
|
let (_, g2) = g;
|
2021-02-23 16:55:36 -06:00
|
|
|
//~^ WARN unused variable: `g2`
|
|
|
|
let c = || {
|
2021-02-21 09:20:40 -06:00
|
|
|
let (_, t2) = t;
|
2021-02-23 16:55:36 -06:00
|
|
|
//~^ WARN unused variable: `t2`
|
2021-02-21 09:20:40 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
c();
|
|
|
|
};
|
|
|
|
|
|
|
|
a();
|
|
|
|
}
|