rust/tests/ui/async-await/drop-and-assign.rs
Camille GILLOT 211d2ed07b Bless tests.
2023-09-23 13:47:30 +00:00

19 lines
234 B
Rust

// edition:2021
// build-pass
struct A;
impl Drop for A { fn drop(&mut self) {} }
pub async fn f() {
let mut a = A;
a = A;
drop(a);
async {}.await;
}
fn assert_send<T: Send>(_: T) {}
fn main() {
let _ = f();
}