Update tests

This commit is contained in:
Avi Dessauer 2020-06-03 20:39:57 -04:00
parent fb632c747d
commit a5588b9e19
6 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,40 @@
SOURCE_FILE@0..39
TRAIT_DEF@0..38
TRAIT_KW@0..5 "trait"
WHITESPACE@5..6 " "
NAME@6..7
IDENT@6..7 "T"
WHITESPACE@7..8 " "
ITEM_LIST@8..38
L_CURLY@8..9 "{"
WHITESPACE@9..12 "\n "
MACRO_CALL@12..19
PATH@12..19
PATH_SEGMENT@12..19
NAME_REF@12..19
IDENT@12..19 "default"
WHITESPACE@19..20 " "
CONST_DEF@20..36
CONST_KW@20..25 "const"
WHITESPACE@25..26 " "
NAME@26..27
IDENT@26..27 "f"
COLON@27..28 ":"
WHITESPACE@28..29 " "
PATH_TYPE@29..31
PATH@29..31
PATH_SEGMENT@29..31
NAME_REF@29..31
IDENT@29..31 "u8"
WHITESPACE@31..32 " "
EQ@32..33 "="
WHITESPACE@33..34 " "
LITERAL@34..35
INT_NUMBER@34..35 "0"
SEMICOLON@35..36 ";"
WHITESPACE@36..37 "\n"
R_CURLY@37..38 "}"
WHITESPACE@38..39 "\n"
error 19..19: expected BANG
error 19..19: expected `{`, `[`, `(`
error 19..19: expected SEMICOLON

View File

@ -0,0 +1,3 @@
trait T {
default const f: u8 = 0;
}

View File

@ -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"

View File

@ -0,0 +1,3 @@
impl T for Foo {
default const f: u8 = 0;
}

View File

@ -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"

View File

@ -0,0 +1 @@
default unsafe impl Foo {}