diff options
author | Aleksey Kladov <[email protected]> | 2018-02-03 19:34:35 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-02-03 19:34:35 +0000 |
commit | 9b3d806b0dbfcf76ff707aa86daba83454227720 (patch) | |
tree | bfefe85725b772a44a9abf3823128d08344a6b66 /src/parser | |
parent | 9435ea4b8e990521ee7a6206b6106bb3ce392746 (diff) |
Add infra for inline tests
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/event_parser/grammar/items/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser/event_parser/grammar/items/mod.rs b/src/parser/event_parser/grammar/items/mod.rs index 8ccf8f90f..5cf2fc39a 100644 --- a/src/parser/event_parser/grammar/items/mod.rs +++ b/src/parser/event_parser/grammar/items/mod.rs | |||
@@ -52,11 +52,15 @@ fn item(p: &mut Parser) { | |||
52 | STATIC_ITEM | 52 | STATIC_ITEM |
53 | } | 53 | } |
54 | CONST_KW => match p.nth(1) { | 54 | CONST_KW => match p.nth(1) { |
55 | // test const_fn | ||
56 | // const fn foo() {} | ||
55 | FN_KW => { | 57 | FN_KW => { |
56 | p.bump(); | 58 | p.bump(); |
57 | fn_item(p); | 59 | fn_item(p); |
58 | FN_ITEM | 60 | FN_ITEM |
59 | } | 61 | } |
62 | // test const_unsafe_fn | ||
63 | // const unsafe fn foo() {} | ||
60 | UNSAFE_KW if p.nth(2) == FN_KW => { | 64 | UNSAFE_KW if p.nth(2) == FN_KW => { |
61 | p.bump(); | 65 | p.bump(); |
62 | p.bump(); | 66 | p.bump(); |