diff options
Diffstat (limited to 'tests/ui/inference/cannot-infer-async.rs')
| -rw-r--r-- | tests/ui/inference/cannot-infer-async.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/inference/cannot-infer-async.rs b/tests/ui/inference/cannot-infer-async.rs new file mode 100644 index 00000000000..b5152d04f69 --- /dev/null +++ b/tests/ui/inference/cannot-infer-async.rs @@ -0,0 +1,16 @@ +// edition:2018 + +use std::io::Error; + +fn make_unit() -> Result<(), Error> { + Ok(()) +} + +fn main() { + let fut = async { + make_unit()?; + + Ok(()) + //~^ ERROR type annotations needed + }; +} |
