From 95d239da99cb1b7ba60f5f20f6df54e1397a1bca Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 15 Feb 2021 18:11:10 +0100 Subject: Specialization for async traits --- .../inline/ok/0162_default_async_unsafe_fn.rast | 42 ++++++++++++++++++++++ .../inline/ok/0162_default_async_unsafe_fn.rs | 3 ++ .../parser/inline/ok/0163_default_async_fn.rast | 40 +++++++++++++++++++++ .../parser/inline/ok/0163_default_async_fn.rs | 3 ++ 4 files changed, 88 insertions(+) create mode 100644 crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rs create mode 100644 crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rast create mode 100644 crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rs (limited to 'crates/syntax/test_data/parser/inline/ok') diff --git a/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rast b/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rast new file mode 100644 index 000000000..61c17333a --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rast @@ -0,0 +1,42 @@ +SOURCE_FILE@0..56 + IMPL@0..55 + IMPL_KW@0..4 "impl" + WHITESPACE@4..5 " " + PATH_TYPE@5..6 + PATH@5..6 + PATH_SEGMENT@5..6 + NAME_REF@5..6 + IDENT@5..6 "T" + WHITESPACE@6..7 " " + FOR_KW@7..10 "for" + WHITESPACE@10..11 " " + PATH_TYPE@11..14 + PATH@11..14 + PATH_SEGMENT@11..14 + NAME_REF@11..14 + IDENT@11..14 "Foo" + WHITESPACE@14..15 " " + ASSOC_ITEM_LIST@15..55 + L_CURLY@15..16 "{" + WHITESPACE@16..21 "\n " + FN@21..53 + DEFAULT_KW@21..28 "default" + WHITESPACE@28..29 " " + ASYNC_KW@29..34 "async" + WHITESPACE@34..35 " " + UNSAFE_KW@35..41 "unsafe" + WHITESPACE@41..42 " " + FN_KW@42..44 "fn" + WHITESPACE@44..45 " " + NAME@45..48 + IDENT@45..48 "foo" + PARAM_LIST@48..50 + L_PAREN@48..49 "(" + R_PAREN@49..50 ")" + WHITESPACE@50..51 " " + BLOCK_EXPR@51..53 + L_CURLY@51..52 "{" + R_CURLY@52..53 "}" + WHITESPACE@53..54 "\n" + R_CURLY@54..55 "}" + WHITESPACE@55..56 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rs b/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rs new file mode 100644 index 000000000..05c20a68f --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0162_default_async_unsafe_fn.rs @@ -0,0 +1,3 @@ +impl T for Foo { + default async unsafe fn foo() {} +} diff --git a/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rast b/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rast new file mode 100644 index 000000000..9c43ccea5 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rast @@ -0,0 +1,40 @@ +SOURCE_FILE@0..49 + IMPL@0..48 + IMPL_KW@0..4 "impl" + WHITESPACE@4..5 " " + PATH_TYPE@5..6 + PATH@5..6 + PATH_SEGMENT@5..6 + NAME_REF@5..6 + IDENT@5..6 "T" + WHITESPACE@6..7 " " + FOR_KW@7..10 "for" + WHITESPACE@10..11 " " + PATH_TYPE@11..14 + PATH@11..14 + PATH_SEGMENT@11..14 + NAME_REF@11..14 + IDENT@11..14 "Foo" + WHITESPACE@14..15 " " + ASSOC_ITEM_LIST@15..48 + L_CURLY@15..16 "{" + WHITESPACE@16..21 "\n " + FN@21..46 + DEFAULT_KW@21..28 "default" + WHITESPACE@28..29 " " + ASYNC_KW@29..34 "async" + WHITESPACE@34..35 " " + FN_KW@35..37 "fn" + WHITESPACE@37..38 " " + NAME@38..41 + IDENT@38..41 "foo" + PARAM_LIST@41..43 + L_PAREN@41..42 "(" + R_PAREN@42..43 ")" + WHITESPACE@43..44 " " + BLOCK_EXPR@44..46 + L_CURLY@44..45 "{" + R_CURLY@45..46 "}" + WHITESPACE@46..47 "\n" + R_CURLY@47..48 "}" + WHITESPACE@48..49 "\n" diff --git a/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rs b/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rs new file mode 100644 index 000000000..78c3b4d85 --- /dev/null +++ b/crates/syntax/test_data/parser/inline/ok/0163_default_async_fn.rs @@ -0,0 +1,3 @@ +impl T for Foo { + default async fn foo() {} +} -- cgit v1.2.3