]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/drop-and-assign.rs
Auto merge of #103217 - mejrs:track, r=eholk
[rust.git] / src / test / ui / async-await / drop-and-assign.rs
1 // edition:2021
2 // compile-flags: -Zdrop-tracking
3 // build-pass
4
5 struct A;
6 impl Drop for A { fn drop(&mut self) {} }
7
8 pub async fn f() {
9     let mut a = A;
10     a = A;
11     drop(a);
12     async {}.await;
13 }
14
15 fn assert_send<T: Send>(_: T) {}
16
17 fn main() {
18     let _ = f();
19 }