blob: fa83b53526a85da9442d05ad28bfdecdef723516 [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 || {
let _ = &a;
//~^ HELP: add a dummy
//~| WARNING: drop order
let x = a.0;
println!("{:?}", x);
};
f();
}