Open
Description
The following code currently compiles. Clearly, it should not.
#![feature(async_drop)]
use std::future::AsyncDrop;
use std::pin::Pin;
struct Foo;
impl AsyncDrop for &Foo {
async fn drop(self: Pin<&mut Self>) {}
}
impl AsyncDrop for Pin<Foo> {
async fn drop(self: Pin<&mut Self>) {}
}
Meta
Reproducible on the playground with 1.90.0-nightly (2025-07-08 ab68b0fb26485ab1fa69)
@rustbot labels +F-async_drop