diff options
| author | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-05-28 13:56:23 +0700 |
|---|---|---|
| committer | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-06-01 15:22:29 +0700 |
| commit | f023a69f32352531a8da2f43e2ca4cd087317f8c (patch) | |
| tree | c180d3f71e6b6799e3afd1d6fe6ffbf4df487458 /tests/ui/async-await/async-drop/unexpected-sort.rs | |
| parent | aa57e46e24a4a08cc336325e92567b40b0c2ba62 (diff) | |
| download | rust-f023a69f32352531a8da2f43e2ca4cd087317f8c.tar.gz rust-f023a69f32352531a8da2f43e2ca4cd087317f8c.zip | |
Async drop - type instead of async drop fn and incorrect drop signature don't ICE now
Diffstat (limited to 'tests/ui/async-await/async-drop/unexpected-sort.rs')
| -rw-r--r-- | tests/ui/async-await/async-drop/unexpected-sort.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-drop/unexpected-sort.rs b/tests/ui/async-await/async-drop/unexpected-sort.rs new file mode 100644 index 00000000000..659e21eb241 --- /dev/null +++ b/tests/ui/async-await/async-drop/unexpected-sort.rs @@ -0,0 +1,18 @@ +// Ex-ice: #140484 +//@ edition: 2024 +#![crate_type = "lib"] +#![allow(incomplete_features)] +#![allow(non_camel_case_types)] +#![feature(async_drop)] +use std::future::AsyncDrop; +struct a; +impl Drop for a { //~ ERROR: not all trait items implemented, missing: `drop` + fn b() {} //~ ERROR: method `b` is not a member of trait `Drop` +} +impl AsyncDrop for a { //~ ERROR: not all trait items implemented, missing: `drop` + type c = (); + //~^ ERROR: type `c` is not a member of trait `AsyncDrop` +} +async fn bar() { + a; +} |
