mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-18 19:06:14 +00:00
22 lines
445 B
Rust
22 lines
445 B
Rust
//@ edition: 2018
|
|
|
|
#![feature(async_drop)]
|
|
//~^ WARN the feature `async_drop` is incomplete
|
|
|
|
use std::future::AsyncDrop;
|
|
use std::pin::Pin;
|
|
|
|
struct Foo;
|
|
|
|
impl AsyncDrop for &Foo {
|
|
//~^ ERROR the `AsyncDrop` trait may only be implemented for
|
|
async fn drop(self: Pin<&mut Self>) {}
|
|
}
|
|
|
|
impl AsyncDrop for Pin<Foo> {
|
|
//~^ ERROR the `AsyncDrop` trait may only be implemented for
|
|
async fn drop(self: Pin<&mut Self>) {}
|
|
}
|
|
|
|
fn main() {}
|