summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/async_fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/source/async_fn.rs')
-rw-r--r--src/tools/rustfmt/tests/source/async_fn.rs28
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
+ ?
+ ;
+}