diff options
| author | Michael Goulet <michael@errs.io> | 2024-01-25 17:43:35 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-02-06 02:22:58 +0000 |
| commit | 37184e86ea58bc90b8cd97f877d52ccce8ea02ab (patch) | |
| tree | ccdae57eb3b8210c03d14b8e6e7a558c429a63bf /tests/ui/async-await/async-closures/arg-mismatch.rs | |
| parent | 881b6b5149e882434a8df80a829bcfde0a2e9d37 (diff) | |
| download | rust-37184e86ea58bc90b8cd97f877d52ccce8ea02ab.tar.gz rust-37184e86ea58bc90b8cd97f877d52ccce8ea02ab.zip | |
Add some tests
Diffstat (limited to 'tests/ui/async-await/async-closures/arg-mismatch.rs')
| -rw-r--r-- | tests/ui/async-await/async-closures/arg-mismatch.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-closures/arg-mismatch.rs b/tests/ui/async-await/async-closures/arg-mismatch.rs new file mode 100644 index 00000000000..650e13677bc --- /dev/null +++ b/tests/ui/async-await/async-closures/arg-mismatch.rs @@ -0,0 +1,15 @@ +// aux-build:block-on.rs +// edition:2021 + +#![feature(async_closure)] + +extern crate block_on; + +fn main() { + block_on::block_on(async { + let c = async |x| {}; + c(1i32).await; + c(2usize).await; + //~^ ERROR mismatched types + }); +} |
