diff options
| author | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-19 03:27:53 +0000 |
| commit | 8a65ee08296b36342bf7c3cdc15312ccbc357227 (patch) | |
| tree | dd41afef08338c59067cd819c05f4a571ad2f36b /tests/ui/async-await/async-drop/async-without-sync.rs | |
| parent | d1d8e386c5e84c4ba857f56c3291f73c27e2d62a (diff) | |
| parent | 986f8cd709f9a9a6ac8888e4f1fe5eaf3dbfdefd (diff) | |
| download | rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.tar.gz rust-8a65ee08296b36342bf7c3cdc15312ccbc357227.zip | |
Auto merge of #142697 - tgross35:rollup-xu4yuq6, r=tgross35
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs) - rust-lang/rust#142507 (use `#[align]` attribute for `fn_align`) - rust-lang/rust#142524 (Weekly `cargo update`) - rust-lang/rust#142606 (AsyncDrop trait without sync Drop generates an error) - rust-lang/rust#142639 (Add a missing colon at the end of the panic location details in location-detail-unwrap-multiline.rs) - rust-lang/rust#142654 (library: Increase timeout on mpmc test to reduce flakes) - rust-lang/rust#142692 (Assorted bootstrap cleanups (step 3)) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/async-await/async-drop/async-without-sync.rs')
| -rw-r--r-- | tests/ui/async-await/async-drop/async-without-sync.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-drop/async-without-sync.rs b/tests/ui/async-await/async-drop/async-without-sync.rs new file mode 100644 index 00000000000..8a748636cc7 --- /dev/null +++ b/tests/ui/async-await/async-drop/async-without-sync.rs @@ -0,0 +1,19 @@ +//@ edition: 2024 +#![feature(async_drop)] +#![allow(incomplete_features)] +#![crate_type = "lib"] + +use std::future::AsyncDrop; +use std::pin::Pin; + +async fn foo() { + let _st = St; +} + +struct St; + +impl AsyncDrop for St { //~ ERROR: `AsyncDrop` impl without `Drop` impl + async fn drop(self: Pin<&mut Self>) { + println!("123"); + } +} |
