From a5588b9e19cbbc18b1afd9afcc9bab2bce2b711c Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Wed, 3 Jun 2020 20:39:57 -0400 Subject: Update tests --- .../parser/inline/ok/0162_default_const.rast | 44 ++++++++++++++++++++++ .../parser/inline/ok/0162_default_const.rs | 3 ++ .../parser/inline/ok/0163_default_unsafe_impl.rast | 18 +++++++++ .../parser/inline/ok/0163_default_unsafe_impl.rs | 1 + 4 files changed, 66 insertions(+) create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs (limited to 'crates/ra_syntax/test_data/parser/inline/ok') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rast b/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rast new file mode 100644 index 000000000..dab0247ee --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rast @@ -0,0 +1,44 @@ +SOURCE_FILE@0..46 + IMPL_DEF@0..45 + 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 " " + ITEM_LIST@15..45 + L_CURLY@15..16 "{" + WHITESPACE@16..19 "\n " + CONST_DEF@19..43 + DEFAULT_KW@19..26 "default" + WHITESPACE@26..27 " " + CONST_KW@27..32 "const" + WHITESPACE@32..33 " " + NAME@33..34 + IDENT@33..34 "f" + COLON@34..35 ":" + WHITESPACE@35..36 " " + PATH_TYPE@36..38 + PATH@36..38 + PATH_SEGMENT@36..38 + NAME_REF@36..38 + IDENT@36..38 "u8" + WHITESPACE@38..39 " " + EQ@39..40 "=" + WHITESPACE@40..41 " " + LITERAL@41..42 + INT_NUMBER@41..42 "0" + SEMICOLON@42..43 ";" + WHITESPACE@43..44 "\n" + R_CURLY@44..45 "}" + WHITESPACE@45..46 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rs b/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rs new file mode 100644 index 000000000..dfb3b92dc --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0162_default_const.rs @@ -0,0 +1,3 @@ +impl T for Foo { + default const f: u8 = 0; +} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast new file mode 100644 index 000000000..a9eda5668 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast @@ -0,0 +1,18 @@ +SOURCE_FILE@0..27 + IMPL_DEF@0..26 + DEFAULT_KW@0..7 "default" + WHITESPACE@7..8 " " + UNSAFE_KW@8..14 "unsafe" + 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 " " + 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/0163_default_unsafe_impl.rs b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs new file mode 100644 index 000000000..ba0998ff4 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rs @@ -0,0 +1 @@ +default unsafe impl Foo {} -- cgit v1.2.3