diff options
| author | Michael Goulet <michael@errs.io> | 2024-11-11 17:42:35 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-11-22 16:55:28 +0000 |
| commit | 4c53ad5f244c840049fa706e6e334c1efc19fe7d (patch) | |
| tree | 132b85990ce3918acbe04f30e9786797506dac0f /tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs | |
| parent | 7540306a4994df05e4aca27130b2757e55000ac7 (diff) | |
| download | rust-4c53ad5f244c840049fa706e6e334c1efc19fe7d.tar.gz rust-4c53ad5f244c840049fa706e6e334c1efc19fe7d.zip | |
Pretty print AsyncFn traits too
Diffstat (limited to 'tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs')
| -rw-r--r-- | tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs b/tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs new file mode 100644 index 00000000000..2e7cf1b09fd --- /dev/null +++ b/tests/ui/async-await/async-closures/pretty-async-fn-opaque.rs @@ -0,0 +1,14 @@ +//@ edition: 2021 + +#![feature(async_closure)] + +use std::ops::AsyncFnMut; + +fn produce() -> impl AsyncFnMut() -> &'static str { + async || "" +} + +fn main() { + let x: i32 = produce(); + //~^ ERROR mismatched types +} |
