blob: 4070e5c35a44174a171067e65c0fb849150c7b3f [file] [log] [blame]
//@ run-rustfix
//@ edition:2018
//@ check-pass
#![feature(ergonomic_clones)]
#![warn(rust_2021_compatibility)]
#![allow(incomplete_features)]
#[derive(Debug)]
struct Foo(i32);
impl Drop for Foo {
fn drop(&mut self) {
println!("{:?} dropped", self.0);
}
}
fn main() {
let a = (Foo(0), Foo(1));
let f = use || {
//~^ HELP: add a dummy
//~| WARNING: drop order
let x = a.0;
println!("{:?}", x);
};
f();
}