diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/source/async_fn.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/async_fn.rs b/src/tools/rustfmt/tests/source/async_fn.rs new file mode 100644 index 000000000..c63cf5b0f --- /dev/null +++ b/src/tools/rustfmt/tests/source/async_fn.rs @@ -0,0 +1,28 @@ +// rustfmt-edition: 2018 + +async fn bar() -> Result<(), ()> { + Ok(()) +} + +pub async fn baz() -> Result<(), ()> { + Ok(()) +} + +async unsafe fn foo() { + async move { + Ok(()) + } +} + +async unsafe fn rust() { + async move { // comment + Ok(()) + } +} + +async fn await_try() { + something + .await + ? + ; +} |