-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-async_drop`#![feature(async_drop)]``#![feature(async_drop)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-async_drop`#![feature(async_drop)]``#![feature(async_drop)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.