From f8bfd77e84e5b51dc28ff219e99fdfd6fd9f92c2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 14:52:37 +0200 Subject: Cleanup parser modifiers tests --- .../test_data/parser/err/0043_weird_blocks.rast | 71 +++++++ .../test_data/parser/err/0043_weird_blocks.rs | 6 + .../test_data/parser/err/0045_item_modifiers.rast | 45 +++++ .../test_data/parser/err/0045_item_modifiers.rs | 2 + .../test_data/parser/err/0163_weird_blocks.rast | 71 ------- .../test_data/parser/err/0163_weird_blocks.rs | 6 - .../parser/inline/err/0010_wrong_order_fns.rast | 45 ----- .../parser/inline/err/0010_wrong_order_fns.rs | 2 - .../parser/inline/ok/0016_unsafe_trait.rast | 13 -- .../parser/inline/ok/0016_unsafe_trait.rs | 1 - .../parser/inline/ok/0036_unsafe_extern_fn.rast | 21 -- .../parser/inline/ok/0036_unsafe_extern_fn.rs | 1 - .../parser/inline/ok/0047_unsafe_default_impl.rast | 18 -- .../parser/inline/ok/0047_unsafe_default_impl.rs | 1 - .../test_data/parser/inline/ok/0057_const_fn.rast | 16 -- .../test_data/parser/inline/ok/0057_const_fn.rs | 1 - .../parser/inline/ok/0087_unsafe_impl.rast | 16 -- .../test_data/parser/inline/ok/0087_unsafe_impl.rs | 1 - .../test_data/parser/inline/ok/0089_extern_fn.rast | 17 -- .../test_data/parser/inline/ok/0089_extern_fn.rs | 1 - .../parser/inline/ok/0091_auto_trait.rast | 13 -- .../test_data/parser/inline/ok/0091_auto_trait.rs | 1 - .../parser/inline/ok/0094_unsafe_auto_trait.rast | 15 -- .../parser/inline/ok/0094_unsafe_auto_trait.rs | 1 - .../parser/inline/ok/0097_default_impl.rast | 16 -- .../parser/inline/ok/0097_default_impl.rs | 1 - .../parser/inline/ok/0098_const_unsafe_fn.rast | 18 -- .../parser/inline/ok/0098_const_unsafe_fn.rs | 1 - .../test_data/parser/inline/ok/0101_unsafe_fn.rast | 16 -- .../test_data/parser/inline/ok/0101_unsafe_fn.rs | 1 - .../test_data/parser/inline/ok/0124_async_fn.rast | 16 -- .../test_data/parser/inline/ok/0124_async_fn.rs | 1 - .../parser/inline/ok/0128_combined_fns.rast | 35 ---- .../parser/inline/ok/0128_combined_fns.rs | 2 - .../test_data/parser/inline/ok/0151_fn.rast | 14 ++ .../test_data/parser/inline/ok/0151_fn.rs | 1 + .../test_data/parser/inline/ok/0152_impl.rast | 22 +++ .../test_data/parser/inline/ok/0152_impl.rs | 1 + .../test_data/parser/inline/ok/0153_trait.rast | 11 ++ .../test_data/parser/inline/ok/0153_trait.rs | 1 + .../test_data/parser/ok/0021_extern_fn.rast | 56 ------ .../test_data/parser/ok/0021_extern_fn.rs | 8 - .../test_data/parser/ok/0068_item_modifiers.rast | 218 +++++++++++++++++++++ .../test_data/parser/ok/0068_item_modifiers.rs | 16 ++ 44 files changed, 408 insertions(+), 432 deletions(-) create mode 100644 crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast create mode 100644 crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs create mode 100644 crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast create mode 100644 crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs delete mode 100644 crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast delete mode 100644 crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs delete mode 100644 crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast delete mode 100644 crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs create mode 100644 crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast create mode 100644 crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs (limited to 'crates/ra_syntax/test_data/parser') diff --git a/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast new file mode 100644 index 000000000..df29017e7 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rast @@ -0,0 +1,71 @@ +SOURCE_FILE@0..83 + FN@0..82 + FN_KW@0..2 "fn" + WHITESPACE@2..3 " " + NAME@3..7 + IDENT@3..7 "main" + PARAM_LIST@7..9 + L_PAREN@7..8 "(" + R_PAREN@8..9 ")" + WHITESPACE@9..10 " " + BLOCK_EXPR@10..82 + L_CURLY@10..11 "{" + WHITESPACE@11..16 "\n " + EXPR_STMT@16..29 + BLOCK_EXPR@16..29 + L_CURLY@16..17 "{" + WHITESPACE@17..18 " " + ERROR@18..24 + UNSAFE_KW@18..24 "unsafe" + WHITESPACE@24..25 " " + LITERAL@25..27 + INT_NUMBER@25..27 "92" + WHITESPACE@27..28 " " + R_CURLY@28..29 "}" + WHITESPACE@29..34 "\n " + EXPR_STMT@34..46 + BLOCK_EXPR@34..46 + L_CURLY@34..35 "{" + WHITESPACE@35..36 " " + ERROR@36..41 + ASYNC_KW@36..41 "async" + WHITESPACE@41..42 " " + LITERAL@42..44 + INT_NUMBER@42..44 "92" + WHITESPACE@44..45 " " + R_CURLY@45..46 "}" + WHITESPACE@46..51 "\n " + EXPR_STMT@51..61 + BLOCK_EXPR@51..61 + L_CURLY@51..52 "{" + WHITESPACE@52..53 " " + EXPR_STMT@53..56 + EFFECT_EXPR@53..56 + TRY_KW@53..56 "try" + WHITESPACE@56..57 " " + LITERAL@57..59 + INT_NUMBER@57..59 "92" + WHITESPACE@59..60 " " + R_CURLY@60..61 "}" + WHITESPACE@61..66 "\n " + BLOCK_EXPR@66..80 + L_CURLY@66..67 "{" + WHITESPACE@67..68 " " + EXPR_STMT@68..75 + ERROR@68..75 + LABEL@68..75 + LIFETIME@68..74 "\'label" + COLON@74..75 ":" + WHITESPACE@75..76 " " + LITERAL@76..78 + INT_NUMBER@76..78 "92" + WHITESPACE@78..79 " " + R_CURLY@79..80 "}" + WHITESPACE@80..81 "\n" + R_CURLY@81..82 "}" + WHITESPACE@82..83 "\n" +error 24..24: expected existential, fn, trait or impl +error 41..41: expected existential, fn, trait or impl +error 56..56: expected a block +error 75..75: expected a loop +error 75..75: expected SEMICOLON diff --git a/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs new file mode 100644 index 000000000..8fa324c1a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0043_weird_blocks.rs @@ -0,0 +1,6 @@ +fn main() { + { unsafe 92 } + { async 92 } + { try 92 } + { 'label: 92 } +} diff --git a/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast new file mode 100644 index 000000000..a6e6552a9 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rast @@ -0,0 +1,45 @@ +SOURCE_FILE@0..50 + ERROR@0..6 + UNSAFE_KW@0..6 "unsafe" + WHITESPACE@6..7 " " + FN@7..24 + ASYNC_KW@7..12 "async" + WHITESPACE@12..13 " " + FN_KW@13..15 "fn" + WHITESPACE@15..16 " " + NAME@16..19 + IDENT@16..19 "foo" + PARAM_LIST@19..21 + L_PAREN@19..20 "(" + R_PAREN@20..21 ")" + WHITESPACE@21..22 " " + BLOCK_EXPR@22..24 + L_CURLY@22..23 "{" + R_CURLY@23..24 "}" + WHITESPACE@24..25 "\n" + CONST@25..46 + UNSAFE_KW@25..31 "unsafe" + WHITESPACE@31..32 " " + CONST_KW@32..37 "const" + WHITESPACE@37..38 " " + ERROR@38..40 + FN_KW@38..40 "fn" + WHITESPACE@40..41 " " + PATH_TYPE@41..46 + PATH@41..46 + PATH_SEGMENT@41..46 + NAME_REF@41..44 + IDENT@41..44 "bar" + PARAM_LIST@44..46 + L_PAREN@44..45 "(" + R_PAREN@45..46 ")" + WHITESPACE@46..47 " " + ERROR@47..49 + L_CURLY@47..48 "{" + R_CURLY@48..49 "}" + WHITESPACE@49..50 "\n" +error 6..6: expected existential, fn, trait or impl +error 38..38: expected a name +error 40..40: expected COLON +error 46..46: expected SEMICOLON +error 47..47: expected an item diff --git a/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs new file mode 100644 index 000000000..731e58013 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0045_item_modifiers.rs @@ -0,0 +1,2 @@ +unsafe async fn foo() {} +unsafe const fn bar() {} diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast deleted file mode 100644 index df29017e7..000000000 --- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast +++ /dev/null @@ -1,71 +0,0 @@ -SOURCE_FILE@0..83 - FN@0..82 - FN_KW@0..2 "fn" - WHITESPACE@2..3 " " - NAME@3..7 - IDENT@3..7 "main" - PARAM_LIST@7..9 - L_PAREN@7..8 "(" - R_PAREN@8..9 ")" - WHITESPACE@9..10 " " - BLOCK_EXPR@10..82 - L_CURLY@10..11 "{" - WHITESPACE@11..16 "\n " - EXPR_STMT@16..29 - BLOCK_EXPR@16..29 - L_CURLY@16..17 "{" - WHITESPACE@17..18 " " - ERROR@18..24 - UNSAFE_KW@18..24 "unsafe" - WHITESPACE@24..25 " " - LITERAL@25..27 - INT_NUMBER@25..27 "92" - WHITESPACE@27..28 " " - R_CURLY@28..29 "}" - WHITESPACE@29..34 "\n " - EXPR_STMT@34..46 - BLOCK_EXPR@34..46 - L_CURLY@34..35 "{" - WHITESPACE@35..36 " " - ERROR@36..41 - ASYNC_KW@36..41 "async" - WHITESPACE@41..42 " " - LITERAL@42..44 - INT_NUMBER@42..44 "92" - WHITESPACE@44..45 " " - R_CURLY@45..46 "}" - WHITESPACE@46..51 "\n " - EXPR_STMT@51..61 - BLOCK_EXPR@51..61 - L_CURLY@51..52 "{" - WHITESPACE@52..53 " " - EXPR_STMT@53..56 - EFFECT_EXPR@53..56 - TRY_KW@53..56 "try" - WHITESPACE@56..57 " " - LITERAL@57..59 - INT_NUMBER@57..59 "92" - WHITESPACE@59..60 " " - R_CURLY@60..61 "}" - WHITESPACE@61..66 "\n " - BLOCK_EXPR@66..80 - L_CURLY@66..67 "{" - WHITESPACE@67..68 " " - EXPR_STMT@68..75 - ERROR@68..75 - LABEL@68..75 - LIFETIME@68..74 "\'label" - COLON@74..75 ":" - WHITESPACE@75..76 " " - LITERAL@76..78 - INT_NUMBER@76..78 "92" - WHITESPACE@78..79 " " - R_CURLY@79..80 "}" - WHITESPACE@80..81 "\n" - R_CURLY@81..82 "}" - WHITESPACE@82..83 "\n" -error 24..24: expected existential, fn, trait or impl -error 41..41: expected existential, fn, trait or impl -error 56..56: expected a block -error 75..75: expected a loop -error 75..75: expected SEMICOLON diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs deleted file mode 100644 index 8fa324c1a..000000000 --- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - { unsafe 92 } - { async 92 } - { try 92 } - { 'label: 92 } -} diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast deleted file mode 100644 index a6e6552a9..000000000 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast +++ /dev/null @@ -1,45 +0,0 @@ -SOURCE_FILE@0..50 - ERROR@0..6 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - FN@7..24 - ASYNC_KW@7..12 "async" - WHITESPACE@12..13 " " - FN_KW@13..15 "fn" - WHITESPACE@15..16 " " - NAME@16..19 - IDENT@16..19 "foo" - PARAM_LIST@19..21 - L_PAREN@19..20 "(" - R_PAREN@20..21 ")" - WHITESPACE@21..22 " " - BLOCK_EXPR@22..24 - L_CURLY@22..23 "{" - R_CURLY@23..24 "}" - WHITESPACE@24..25 "\n" - CONST@25..46 - UNSAFE_KW@25..31 "unsafe" - WHITESPACE@31..32 " " - CONST_KW@32..37 "const" - WHITESPACE@37..38 " " - ERROR@38..40 - FN_KW@38..40 "fn" - WHITESPACE@40..41 " " - PATH_TYPE@41..46 - PATH@41..46 - PATH_SEGMENT@41..46 - NAME_REF@41..44 - IDENT@41..44 "bar" - PARAM_LIST@44..46 - L_PAREN@44..45 "(" - R_PAREN@45..46 ")" - WHITESPACE@46..47 " " - ERROR@47..49 - L_CURLY@47..48 "{" - R_CURLY@48..49 "}" - WHITESPACE@49..50 "\n" -error 6..6: expected existential, fn, trait or impl -error 38..38: expected a name -error 40..40: expected COLON -error 46..46: expected SEMICOLON -error 47..47: expected an item diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs deleted file mode 100644 index 731e58013..000000000 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs +++ /dev/null @@ -1,2 +0,0 @@ -unsafe async fn foo() {} -unsafe const fn bar() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast deleted file mode 100644 index 625ab4c2d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast +++ /dev/null @@ -1,13 +0,0 @@ -SOURCE_FILE@0..18 - TRAIT@0..17 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - TRAIT_KW@7..12 "trait" - WHITESPACE@12..13 " " - NAME@13..14 - IDENT@13..14 "T" - WHITESPACE@14..15 " " - ASSOC_ITEM_LIST@15..17 - L_CURLY@15..16 "{" - R_CURLY@16..17 "}" - WHITESPACE@17..18 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs deleted file mode 100644 index 04e021550..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe trait T {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast deleted file mode 100644 index 293b1d64c..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast +++ /dev/null @@ -1,21 +0,0 @@ -SOURCE_FILE@0..30 - FN@0..29 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - ABI@7..17 - EXTERN_KW@7..13 "extern" - WHITESPACE@13..14 " " - STRING@14..17 "\"C\"" - WHITESPACE@17..18 " " - FN_KW@18..20 "fn" - WHITESPACE@20..21 " " - NAME@21..24 - IDENT@21..24 "foo" - PARAM_LIST@24..26 - L_PAREN@24..25 "(" - R_PAREN@25..26 ")" - WHITESPACE@26..27 " " - BLOCK_EXPR@27..29 - L_CURLY@27..28 "{" - R_CURLY@28..29 "}" - WHITESPACE@29..30 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs deleted file mode 100644 index 1295c2cd2..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe extern "C" fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast deleted file mode 100644 index d6dfa83b7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast +++ /dev/null @@ -1,18 +0,0 @@ -SOURCE_FILE@0..27 - IMPL@0..26 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - DEFAULT_KW@7..14 "default" - WHITESPACE@14..15 " " - IMPL_KW@15..19 "impl" - WHITESPACE@19..20 " " - PATH_TYPE@20..23 - PATH@20..23 - PATH_SEGMENT@20..23 - NAME_REF@20..23 - IDENT@20..23 "Foo" - WHITESPACE@23..24 " " - ASSOC_ITEM_LIST@24..26 - L_CURLY@24..25 "{" - R_CURLY@25..26 "}" - WHITESPACE@26..27 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs deleted file mode 100644 index 9cd6c57bd..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe default impl Foo {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast deleted file mode 100644 index 97548a5ee..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast +++ /dev/null @@ -1,16 +0,0 @@ -SOURCE_FILE@0..18 - FN@0..17 - CONST_KW@0..5 "const" - WHITESPACE@5..6 " " - FN_KW@6..8 "fn" - WHITESPACE@8..9 " " - NAME@9..12 - IDENT@9..12 "foo" - PARAM_LIST@12..14 - L_PAREN@12..13 "(" - R_PAREN@13..14 ")" - WHITESPACE@14..15 " " - BLOCK_EXPR@15..17 - L_CURLY@15..16 "{" - R_CURLY@16..17 "}" - WHITESPACE@17..18 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs deleted file mode 100644 index 8c84d9cd7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rs +++ /dev/null @@ -1 +0,0 @@ -const fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast deleted file mode 100644 index 43c09affe..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast +++ /dev/null @@ -1,16 +0,0 @@ -SOURCE_FILE@0..19 - IMPL@0..18 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - IMPL_KW@7..11 "impl" - WHITESPACE@11..12 " " - PATH_TYPE@12..15 - PATH@12..15 - PATH_SEGMENT@12..15 - NAME_REF@12..15 - IDENT@12..15 "Foo" - WHITESPACE@15..16 " " - ASSOC_ITEM_LIST@16..18 - L_CURLY@16..17 "{" - R_CURLY@17..18 "}" - WHITESPACE@18..19 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs deleted file mode 100644 index 41055f41d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe impl Foo {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast deleted file mode 100644 index 405b6a259..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast +++ /dev/null @@ -1,17 +0,0 @@ -SOURCE_FILE@0..19 - FN@0..18 - ABI@0..6 - EXTERN_KW@0..6 "extern" - WHITESPACE@6..7 " " - FN_KW@7..9 "fn" - WHITESPACE@9..10 " " - NAME@10..13 - IDENT@10..13 "foo" - PARAM_LIST@13..15 - L_PAREN@13..14 "(" - R_PAREN@14..15 ")" - WHITESPACE@15..16 " " - BLOCK_EXPR@16..18 - L_CURLY@16..17 "{" - R_CURLY@17..18 "}" - WHITESPACE@18..19 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs deleted file mode 100644 index 394a049f0..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rs +++ /dev/null @@ -1 +0,0 @@ -extern fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast deleted file mode 100644 index 0cac9ac43..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast +++ /dev/null @@ -1,13 +0,0 @@ -SOURCE_FILE@0..16 - TRAIT@0..15 - AUTO_KW@0..4 "auto" - WHITESPACE@4..5 " " - TRAIT_KW@5..10 "trait" - WHITESPACE@10..11 " " - NAME@11..12 - IDENT@11..12 "T" - WHITESPACE@12..13 " " - ASSOC_ITEM_LIST@13..15 - L_CURLY@13..14 "{" - R_CURLY@14..15 "}" - WHITESPACE@15..16 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs deleted file mode 100644 index 72adf6035..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rs +++ /dev/null @@ -1 +0,0 @@ -auto trait T {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast deleted file mode 100644 index 0ef11c682..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast +++ /dev/null @@ -1,15 +0,0 @@ -SOURCE_FILE@0..23 - TRAIT@0..22 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - AUTO_KW@7..11 "auto" - WHITESPACE@11..12 " " - TRAIT_KW@12..17 "trait" - WHITESPACE@17..18 " " - NAME@18..19 - IDENT@18..19 "T" - WHITESPACE@19..20 " " - ASSOC_ITEM_LIST@20..22 - L_CURLY@20..21 "{" - R_CURLY@21..22 "}" - WHITESPACE@22..23 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs deleted file mode 100644 index 03d29f324..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe auto trait T {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast deleted file mode 100644 index 0a1b21d6e..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast +++ /dev/null @@ -1,16 +0,0 @@ -SOURCE_FILE@0..20 - IMPL@0..19 - DEFAULT_KW@0..7 "default" - WHITESPACE@7..8 " " - IMPL_KW@8..12 "impl" - WHITESPACE@12..13 " " - PATH_TYPE@13..16 - PATH@13..16 - PATH_SEGMENT@13..16 - NAME_REF@13..16 - IDENT@13..16 "Foo" - WHITESPACE@16..17 " " - ASSOC_ITEM_LIST@17..19 - L_CURLY@17..18 "{" - R_CURLY@18..19 "}" - WHITESPACE@19..20 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs deleted file mode 100644 index ef6aa84a2..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rs +++ /dev/null @@ -1 +0,0 @@ -default impl Foo {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast deleted file mode 100644 index 32a77ba49..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast +++ /dev/null @@ -1,18 +0,0 @@ -SOURCE_FILE@0..25 - FN@0..24 - CONST_KW@0..5 "const" - WHITESPACE@5..6 " " - UNSAFE_KW@6..12 "unsafe" - WHITESPACE@12..13 " " - FN_KW@13..15 "fn" - WHITESPACE@15..16 " " - NAME@16..19 - IDENT@16..19 "foo" - PARAM_LIST@19..21 - L_PAREN@19..20 "(" - R_PAREN@20..21 ")" - WHITESPACE@21..22 " " - BLOCK_EXPR@22..24 - L_CURLY@22..23 "{" - R_CURLY@23..24 "}" - WHITESPACE@24..25 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs deleted file mode 100644 index 31a1e435f..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rs +++ /dev/null @@ -1 +0,0 @@ -const unsafe fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast deleted file mode 100644 index 73c94e5d4..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast +++ /dev/null @@ -1,16 +0,0 @@ -SOURCE_FILE@0..19 - FN@0..18 - UNSAFE_KW@0..6 "unsafe" - WHITESPACE@6..7 " " - FN_KW@7..9 "fn" - WHITESPACE@9..10 " " - NAME@10..13 - IDENT@10..13 "foo" - PARAM_LIST@13..15 - L_PAREN@13..14 "(" - R_PAREN@14..15 ")" - WHITESPACE@15..16 " " - BLOCK_EXPR@16..18 - L_CURLY@16..17 "{" - R_CURLY@17..18 "}" - WHITESPACE@18..19 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs deleted file mode 100644 index 33cfc4cd7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rs +++ /dev/null @@ -1 +0,0 @@ -unsafe fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast deleted file mode 100644 index a7df188bd..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast +++ /dev/null @@ -1,16 +0,0 @@ -SOURCE_FILE@0..18 - FN@0..17 - ASYNC_KW@0..5 "async" - WHITESPACE@5..6 " " - FN_KW@6..8 "fn" - WHITESPACE@8..9 " " - NAME@9..12 - IDENT@9..12 "foo" - PARAM_LIST@12..14 - L_PAREN@12..13 "(" - R_PAREN@13..14 ")" - WHITESPACE@14..15 " " - BLOCK_EXPR@15..17 - L_CURLY@15..16 "{" - R_CURLY@16..17 "}" - WHITESPACE@17..18 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs deleted file mode 100644 index f4adcb62b..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rs +++ /dev/null @@ -1 +0,0 @@ -async fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast deleted file mode 100644 index 98a20f36d..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast +++ /dev/null @@ -1,35 +0,0 @@ -SOURCE_FILE@0..50 - FN@0..24 - ASYNC_KW@0..5 "async" - WHITESPACE@5..6 " " - UNSAFE_KW@6..12 "unsafe" - WHITESPACE@12..13 " " - FN_KW@13..15 "fn" - WHITESPACE@15..16 " " - NAME@16..19 - IDENT@16..19 "foo" - PARAM_LIST@19..21 - L_PAREN@19..20 "(" - R_PAREN@20..21 ")" - WHITESPACE@21..22 " " - BLOCK_EXPR@22..24 - L_CURLY@22..23 "{" - R_CURLY@23..24 "}" - WHITESPACE@24..25 "\n" - FN@25..49 - CONST_KW@25..30 "const" - WHITESPACE@30..31 " " - UNSAFE_KW@31..37 "unsafe" - WHITESPACE@37..38 " " - FN_KW@38..40 "fn" - WHITESPACE@40..41 " " - NAME@41..44 - IDENT@41..44 "bar" - PARAM_LIST@44..46 - L_PAREN@44..45 "(" - R_PAREN@45..46 ")" - WHITESPACE@46..47 " " - BLOCK_EXPR@47..49 - L_CURLY@47..48 "{" - R_CURLY@48..49 "}" - WHITESPACE@49..50 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs deleted file mode 100644 index 126287145..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs +++ /dev/null @@ -1,2 +0,0 @@ -async unsafe fn foo() {} -const unsafe fn bar() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast new file mode 100644 index 000000000..23c4269b3 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rast @@ -0,0 +1,14 @@ +SOURCE_FILE@0..12 + FN@0..11 + FN_KW@0..2 "fn" + WHITESPACE@2..3 " " + NAME@3..6 + IDENT@3..6 "foo" + PARAM_LIST@6..8 + L_PAREN@6..7 "(" + R_PAREN@7..8 ")" + WHITESPACE@8..9 " " + BLOCK_EXPR@9..11 + L_CURLY@9..10 "{" + R_CURLY@10..11 "}" + WHITESPACE@11..12 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs new file mode 100644 index 000000000..8f3b7ef11 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0151_fn.rs @@ -0,0 +1 @@ +fn foo() {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast new file mode 100644 index 000000000..7968cf9ff --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rast @@ -0,0 +1,22 @@ +SOURCE_FILE@0..16 + IMPL@0..15 + 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..12 + PATH@11..12 + PATH_SEGMENT@11..12 + NAME_REF@11..12 + IDENT@11..12 "S" + WHITESPACE@12..13 " " + ASSOC_ITEM_LIST@13..15 + L_CURLY@13..14 "{" + R_CURLY@14..15 "}" + WHITESPACE@15..16 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs new file mode 100644 index 000000000..a1a550d8a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_impl.rs @@ -0,0 +1 @@ +impl T for S {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast new file mode 100644 index 000000000..9881e5048 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rast @@ -0,0 +1,11 @@ +SOURCE_FILE@0..11 + TRAIT@0..10 + TRAIT_KW@0..5 "trait" + WHITESPACE@5..6 " " + NAME@6..7 + IDENT@6..7 "T" + WHITESPACE@7..8 " " + ASSOC_ITEM_LIST@8..10 + L_CURLY@8..9 "{" + R_CURLY@9..10 "}" + WHITESPACE@10..11 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs new file mode 100644 index 000000000..8d183dbb5 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait.rs @@ -0,0 +1 @@ +trait T {} diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast deleted file mode 100644 index 5524efaaf..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast +++ /dev/null @@ -1,56 +0,0 @@ -SOURCE_FILE@0..71 - FN@0..19 - ABI@0..6 - EXTERN_KW@0..6 "extern" - WHITESPACE@6..7 " " - FN_KW@7..9 "fn" - WHITESPACE@9..10 " " - NAME@10..13 - IDENT@10..13 "foo" - PARAM_LIST@13..15 - L_PAREN@13..14 "(" - R_PAREN@14..15 ")" - WHITESPACE@15..16 " " - BLOCK_EXPR@16..19 - L_CURLY@16..17 "{" - WHITESPACE@17..18 "\n" - R_CURLY@18..19 "}" - WHITESPACE@19..21 "\n\n" - FN@21..44 - ABI@21..31 - EXTERN_KW@21..27 "extern" - WHITESPACE@27..28 " " - STRING@28..31 "\"C\"" - WHITESPACE@31..32 " " - FN_KW@32..34 "fn" - WHITESPACE@34..35 " " - NAME@35..38 - IDENT@35..38 "bar" - PARAM_LIST@38..40 - L_PAREN@38..39 "(" - R_PAREN@39..40 ")" - WHITESPACE@40..41 " " - BLOCK_EXPR@41..44 - L_CURLY@41..42 "{" - WHITESPACE@42..43 "\n" - R_CURLY@43..44 "}" - WHITESPACE@44..46 "\n\n" - FN@46..70 - ABI@46..57 - EXTERN_KW@46..52 "extern" - WHITESPACE@52..53 " " - RAW_STRING@53..57 "r\"D\"" - WHITESPACE@57..58 " " - FN_KW@58..60 "fn" - WHITESPACE@60..61 " " - NAME@61..64 - IDENT@61..64 "baz" - PARAM_LIST@64..66 - L_PAREN@64..65 "(" - R_PAREN@65..66 ")" - WHITESPACE@66..67 " " - BLOCK_EXPR@67..70 - L_CURLY@67..68 "{" - WHITESPACE@68..69 "\n" - R_CURLY@69..70 "}" - WHITESPACE@70..71 "\n" diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs deleted file mode 100644 index e929eef74..000000000 --- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs +++ /dev/null @@ -1,8 +0,0 @@ -extern fn foo() { -} - -extern "C" fn bar() { -} - -extern r"D" fn baz() { -} diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast new file mode 100644 index 000000000..50a6d8ee9 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast @@ -0,0 +1,218 @@ +SOURCE_FILE@0..304 + FN@0..17 + ASYNC_KW@0..5 "async" + WHITESPACE@5..6 " " + FN_KW@6..8 "fn" + WHITESPACE@8..9 " " + NAME@9..12 + IDENT@9..12 "foo" + PARAM_LIST@12..14 + L_PAREN@12..13 "(" + R_PAREN@13..14 ")" + WHITESPACE@14..15 " " + BLOCK_EXPR@15..17 + L_CURLY@15..16 "{" + R_CURLY@16..17 "}" + WHITESPACE@17..18 "\n" + FN@18..36 + ABI@18..24 + EXTERN_KW@18..24 "extern" + WHITESPACE@24..25 " " + FN_KW@25..27 "fn" + WHITESPACE@27..28 " " + NAME@28..31 + IDENT@28..31 "foo" + PARAM_LIST@31..33 + L_PAREN@31..32 "(" + R_PAREN@32..33 ")" + WHITESPACE@33..34 " " + BLOCK_EXPR@34..36 + L_CURLY@34..35 "{" + R_CURLY@35..36 "}" + WHITESPACE@36..37 "\n" + FN@37..54 + CONST_KW@37..42 "const" + WHITESPACE@42..43 " " + FN_KW@43..45 "fn" + WHITESPACE@45..46 " " + NAME@46..49 + IDENT@46..49 "foo" + PARAM_LIST@49..51 + L_PAREN@49..50 "(" + R_PAREN@50..51 ")" + WHITESPACE@51..52 " " + BLOCK_EXPR@52..54 + L_CURLY@52..53 "{" + R_CURLY@53..54 "}" + WHITESPACE@54..55 "\n" + FN@55..79 + CONST_KW@55..60 "const" + WHITESPACE@60..61 " " + UNSAFE_KW@61..67 "unsafe" + WHITESPACE@67..68 " " + FN_KW@68..70 "fn" + WHITESPACE@70..71 " " + NAME@71..74 + IDENT@71..74 "foo" + PARAM_LIST@74..76 + L_PAREN@74..75 "(" + R_PAREN@75..76 ")" + WHITESPACE@76..77 " " + BLOCK_EXPR@77..79 + L_CURLY@77..78 "{" + R_CURLY@78..79 "}" + WHITESPACE@79..80 "\n" + FN@80..109 + UNSAFE_KW@80..86 "unsafe" + WHITESPACE@86..87 " " + ABI@87..97 + EXTERN_KW@87..93 "extern" + WHITESPACE@93..94 " " + STRING@94..97 "\"C\"" + WHITESPACE@97..98 " " + FN_KW@98..100 "fn" + WHITESPACE@100..101 " " + NAME@101..104 + IDENT@101..104 "foo" + PARAM_LIST@104..106 + L_PAREN@104..105 "(" + R_PAREN@105..106 ")" + WHITESPACE@106..107 " " + BLOCK_EXPR@107..109 + L_CURLY@107..108 "{" + R_CURLY@108..109 "}" + WHITESPACE@109..110 "\n" + FN@110..128 + UNSAFE_KW@110..116 "unsafe" + WHITESPACE@116..117 " " + FN_KW@117..119 "fn" + WHITESPACE@119..120 " " + NAME@120..123 + IDENT@120..123 "foo" + PARAM_LIST@123..125 + L_PAREN@123..124 "(" + R_PAREN@124..125 ")" + WHITESPACE@125..126 " " + BLOCK_EXPR@126..128 + L_CURLY@126..127 "{" + R_CURLY@127..128 "}" + WHITESPACE@128..129 "\n" + FN@129..153 + ASYNC_KW@129..134 "async" + WHITESPACE@134..135 " " + UNSAFE_KW@135..141 "unsafe" + WHITESPACE@141..142 " " + FN_KW@142..144 "fn" + WHITESPACE@144..145 " " + NAME@145..148 + IDENT@145..148 "foo" + PARAM_LIST@148..150 + L_PAREN@148..149 "(" + R_PAREN@149..150 ")" + WHITESPACE@150..151 " " + BLOCK_EXPR@151..153 + L_CURLY@151..152 "{" + R_CURLY@152..153 "}" + WHITESPACE@153..154 "\n" + FN@154..178 + CONST_KW@154..159 "const" + WHITESPACE@159..160 " " + UNSAFE_KW@160..166 "unsafe" + WHITESPACE@166..167 " " + FN_KW@167..169 "fn" + WHITESPACE@169..170 " " + NAME@170..173 + IDENT@170..173 "bar" + PARAM_LIST@173..175 + L_PAREN@173..174 "(" + R_PAREN@174..175 ")" + WHITESPACE@175..176 " " + BLOCK_EXPR@176..178 + L_CURLY@176..177 "{" + R_CURLY@177..178 "}" + WHITESPACE@178..180 "\n\n" + TRAIT@180..197 + UNSAFE_KW@180..186 "unsafe" + WHITESPACE@186..187 " " + TRAIT_KW@187..192 "trait" + WHITESPACE@192..193 " " + NAME@193..194 + IDENT@193..194 "T" + WHITESPACE@194..195 " " + ASSOC_ITEM_LIST@195..197 + L_CURLY@195..196 "{" + R_CURLY@196..197 "}" + WHITESPACE@197..198 "\n" + TRAIT@198..213 + AUTO_KW@198..202 "auto" + WHITESPACE@202..203 " " + TRAIT_KW@203..208 "trait" + WHITESPACE@208..209 " " + NAME@209..210 + IDENT@209..210 "T" + WHITESPACE@210..211 " " + ASSOC_ITEM_LIST@211..213 + L_CURLY@211..212 "{" + R_CURLY@212..213 "}" + WHITESPACE@213..214 "\n" + TRAIT@214..236 + UNSAFE_KW@214..220 "unsafe" + WHITESPACE@220..221 " " + AUTO_KW@221..225 "auto" + WHITESPACE@225..226 " " + TRAIT_KW@226..231 "trait" + WHITESPACE@231..232 " " + NAME@232..233 + IDENT@232..233 "T" + WHITESPACE@233..234 " " + ASSOC_ITEM_LIST@234..236 + L_CURLY@234..235 "{" + R_CURLY@235..236 "}" + WHITESPACE@236..238 "\n\n" + IMPL@238..256 + UNSAFE_KW@238..244 "unsafe" + WHITESPACE@244..245 " " + IMPL_KW@245..249 "impl" + WHITESPACE@249..250 " " + PATH_TYPE@250..253 + PATH@250..253 + PATH_SEGMENT@250..253 + NAME_REF@250..253 + IDENT@250..253 "Foo" + WHITESPACE@253..254 " " + ASSOC_ITEM_LIST@254..256 + L_CURLY@254..255 "{" + R_CURLY@255..256 "}" + WHITESPACE@256..257 "\n" + IMPL@257..276 + DEFAULT_KW@257..264 "default" + WHITESPACE@264..265 " " + IMPL_KW@265..269 "impl" + WHITESPACE@269..270 " " + PATH_TYPE@270..273 + PATH@270..273 + PATH_SEGMENT@270..273 + NAME_REF@270..273 + IDENT@270..273 "Foo" + WHITESPACE@273..274 " " + ASSOC_ITEM_LIST@274..276 + L_CURLY@274..275 "{" + R_CURLY@275..276 "}" + WHITESPACE@276..277 "\n" + IMPL@277..303 + UNSAFE_KW@277..283 "unsafe" + WHITESPACE@283..284 " " + DEFAULT_KW@284..291 "default" + WHITESPACE@291..292 " " + IMPL_KW@292..296 "impl" + WHITESPACE@296..297 " " + PATH_TYPE@297..300 + PATH@297..300 + PATH_SEGMENT@297..300 + NAME_REF@297..300 + IDENT@297..300 "Foo" + WHITESPACE@300..301 " " + ASSOC_ITEM_LIST@301..303 + L_CURLY@301..302 "{" + R_CURLY@302..303 "}" + WHITESPACE@303..304 "\n" diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs new file mode 100644 index 000000000..8d697c04b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs @@ -0,0 +1,16 @@ +async fn foo() {} +extern fn foo() {} +const fn foo() {} +const unsafe fn foo() {} +unsafe extern "C" fn foo() {} +unsafe fn foo() {} +async unsafe fn foo() {} +const unsafe fn bar() {} + +unsafe trait T {} +auto trait T {} +unsafe auto trait T {} + +unsafe impl Foo {} +default impl Foo {} +unsafe default impl Foo {} -- cgit v1.2.3